Refactor path point update logic in viewport-host.ts

This commit is contained in:
2026-04-13 22:33:26 +02:00
parent bcf03e7b72
commit 4d1cafd908

View File

@@ -3296,14 +3296,17 @@ export class ViewportHost {
break;
}
const previewPointId = activeTransformSession.target.pointId;
const previewPosition = activeTransformSession.preview.position;
this.updatePathRenderObjectState(
{
...currentPath,
points: currentPath.points.map((point) =>
point.id === activeTransformSession.target.pointId
point.id === previewPointId
? {
...point,
position: activeTransformSession.preview.position
position: previewPosition
}
: point
)