Fix JSX syntax errors in DesignCanvas - close bracket issues

- Line 245: Added closing brace for JSX expression in Horizontal Ruler
- Line 289: Added closing brace for JSX expression in Vertical Ruler
- Line 367: Removed extra closing paren before inner ternary else clause

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Andymick
2026-07-18 16:00:39 +01:00
co-authored by Claude Haiku 4.5
parent 313943aeaa
commit 10764f3a5b
+39 -26
View File
@@ -153,6 +153,7 @@ function UploadedImage({
// One print surface (photo + the draggable design layer on top). Front and back
// each get their own instance, both always mounted (just shown/hidden with CSS)
// so their Konva stages stay exportable even when you're looking at the other side.
// Force recompile
function PrintSurface({
photo,
printArea,
@@ -326,32 +327,44 @@ function PrintSurface({
el.type === 'text' ? (
el.curvedPath ? (
// Curved text - TextPath with dragging via offset
<TextPath
key={el.id}
ref={(node) => {
if (node) nodeRefs.current.set(el.id, node);
}}
data={generateCurvePath(el.curvedPath.type, el.curvedPath.radius, el.curvedPath.reverse, el.x - 280, el.y - 280)}
text={el.text}
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);
}
}}
/>
) : (
(() => {
const offsetX = el.x - 280;
const offsetY = el.y - 280;
const pathData = generateCurvePath(el.curvedPath.type, el.curvedPath.radius, el.curvedPath.reverse, offsetX, offsetY);
console.log(`🔄 Rendering curved text ${el.text}: position (${el.x}, ${el.y}), offset (${offsetX}, ${offsetY})`);
return (
<TextPath
key={el.id}
ref={(node) => {
if (node) {
nodeRefs.current.set(el.id, node);
console.log(`✓ TextPath node ready: ${el.text}`);
}
}}
data={pathData}
text={el.text}
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
<Text
key={el.id}