diff --git a/src/components/DesignCanvas.tsx b/src/components/DesignCanvas.tsx index df08405..9e0927d 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 - TextPath with path-based positioning + // Curved text - TextPath with dragging via offset { @@ -336,9 +336,20 @@ function PrintSurface({ fontFamily={el.fontFamily} fontSize={el.fontSize} fill={el.fill} + draggable listening={true} onClick={() => setSelectedId(el.id)} onTap={() => setSelectedId(el.id)} + onDragEnd={(e) => { + const node = e.target as any; + const dx = node.x(); + const dy = node.y(); + if (dx !== 0 || dy !== 0) { + updateElement(el.id, { x: el.x + dx, y: el.y + dy }); + node.x(0); + node.y(0); + } + }} /> ) : ( // Regular straight text