Update viewport-host to handle active transform session

This commit is contained in:
2026-04-13 22:32:40 +02:00
parent 05d8f75cb4
commit f5ce536759

View File

@@ -3278,15 +3278,18 @@ export class ViewportHost {
}
break;
case "pathPoint": {
const activeTransformSession = this.currentTransformSession;
if (
this.currentTransformSession.preview.kind !== "pathPoint" ||
activeTransformSession.kind !== "active" ||
activeTransformSession.preview.kind !== "pathPoint" ||
this.currentDocument === null
) {
break;
}
const currentPath =
this.currentDocument.paths[this.currentTransformSession.target.pathId];
this.currentDocument.paths[activeTransformSession.target.pathId];
if (currentPath === undefined) {
break;
@@ -3296,10 +3299,10 @@ export class ViewportHost {
{
...currentPath,
points: currentPath.points.map((point) =>
point.id === this.currentTransformSession.target.pointId
point.id === activeTransformSession.target.pointId
? {
...point,
position: this.currentTransformSession.preview.position
position: activeTransformSession.preview.position
}
: point
)