From 6a1f4c7ca1183d6c8c3801c580f33316d4aae673 Mon Sep 17 00:00:00 2001 From: Andymick Date: Sat, 18 Jul 2026 15:19:24 +0100 Subject: [PATCH] Fix TextPath positioning - remove x/y coordinates - TextPath positioning is handled by the path data, not x/y coordinates - Removed x={el.x} and y={el.y} from TextPath to prevent coordinate corruption - Removes drag handlers from TextPath since curves are centered on canvas - Text now properly persists when toggling between curved and straight Co-Authored-By: Claude Haiku 4.5 --- src/components/DesignCanvas.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/DesignCanvas.tsx b/src/components/DesignCanvas.tsx index aa9e21e..dbd5ab9 100644 --- a/src/components/DesignCanvas.tsx +++ b/src/components/DesignCanvas.tsx @@ -325,7 +325,7 @@ function PrintSurface({ {elements.map((el) => el.type === 'text' ? ( el.curvedPath ? ( - // Curved text path - directly draggable + // Curved text path - centered on canvas { @@ -336,16 +336,9 @@ function PrintSurface({ fontFamily={el.fontFamily} fontSize={el.fontSize} fill={el.fill} - x={el.x} - y={el.y} - draggable listening={true} onClick={() => setSelectedId(el.id)} onTap={() => setSelectedId(el.id)} - onDragEnd={(e) => { - const node = e.target as any; - updateElement(el.id, { x: node.x(), y: node.y() }); - }} /> ) : ( // Regular straight text