From f51cc1d1099f5418d5db588165b52e73b1956796 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 12 May 2026 22:09:07 +0200 Subject: [PATCH] Update path render object state during path point transformation --- src/viewport-three/viewport-host.ts | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index e2911e63..e2345cac 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -6393,6 +6393,47 @@ export class ViewportHost { }); break; } + case "pathPoints": { + const activeTransformSession = this.currentTransformSession; + + if ( + activeTransformSession.kind !== "active" || + activeTransformSession.target.kind !== "pathPoints" || + activeTransformSession.preview.kind !== "pathPoints" || + this.currentDocument === null + ) { + break; + } + + const currentPath = + this.currentDocument.paths[activeTransformSession.target.pathId]; + + if (currentPath === undefined) { + break; + } + + const previewPositionsByPointId = new Map( + activeTransformSession.preview.items.map((item) => [ + item.pointId, + item.position + ]) + ); + + this.updatePathRenderObjectState({ + ...currentPath, + points: currentPath.points.map((point) => { + const previewPosition = previewPositionsByPointId.get(point.id); + + return previewPosition === undefined + ? point + : { + ...point, + position: previewPosition + }; + }) + }); + break; + } case "entity": { if ( this.currentTransformSession.preview.kind !== "entity" ||