diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index 1c5be524..158ddbb5 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -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 )