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:
co-authored by
Claude Haiku 4.5
parent
313943aeaa
commit
10764f3a5b
@@ -153,6 +153,7 @@ function UploadedImage({
|
|||||||
// One print surface (photo + the draggable design layer on top). Front and back
|
// 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)
|
// 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.
|
// so their Konva stages stay exportable even when you're looking at the other side.
|
||||||
|
// Force recompile
|
||||||
function PrintSurface({
|
function PrintSurface({
|
||||||
photo,
|
photo,
|
||||||
printArea,
|
printArea,
|
||||||
@@ -326,32 +327,44 @@ function PrintSurface({
|
|||||||
el.type === 'text' ? (
|
el.type === 'text' ? (
|
||||||
el.curvedPath ? (
|
el.curvedPath ? (
|
||||||
// Curved text - TextPath with dragging via offset
|
// Curved text - TextPath with dragging via offset
|
||||||
<TextPath
|
(() => {
|
||||||
key={el.id}
|
const offsetX = el.x - 280;
|
||||||
ref={(node) => {
|
const offsetY = el.y - 280;
|
||||||
if (node) nodeRefs.current.set(el.id, node);
|
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})`);
|
||||||
data={generateCurvePath(el.curvedPath.type, el.curvedPath.radius, el.curvedPath.reverse, el.x - 280, el.y - 280)}
|
return (
|
||||||
text={el.text}
|
<TextPath
|
||||||
fontFamily={el.fontFamily}
|
key={el.id}
|
||||||
fontSize={el.fontSize}
|
ref={(node) => {
|
||||||
fill={el.fill}
|
if (node) {
|
||||||
draggable
|
nodeRefs.current.set(el.id, node);
|
||||||
listening={true}
|
console.log(`✓ TextPath node ready: ${el.text}`);
|
||||||
onClick={() => setSelectedId(el.id)}
|
}
|
||||||
onTap={() => setSelectedId(el.id)}
|
}}
|
||||||
onDragEnd={(e) => {
|
data={pathData}
|
||||||
const node = e.target as any;
|
text={el.text}
|
||||||
const dx = node.x();
|
fontFamily={el.fontFamily}
|
||||||
const dy = node.y();
|
fontSize={el.fontSize}
|
||||||
if (dx !== 0 || dy !== 0) {
|
fill={el.fill}
|
||||||
updateElement(el.id, { x: el.x + dx, y: el.y + dy });
|
draggable
|
||||||
node.x(0);
|
listening={true}
|
||||||
node.y(0);
|
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
|
// Regular straight text
|
||||||
<Text
|
<Text
|
||||||
key={el.id}
|
key={el.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user