diff --git a/src/app/api/orders/[id]/design-spec/route.ts b/src/app/api/orders/[id]/design-spec/route.ts
index 194bc23..289bf55 100644
--- a/src/app/api/orders/[id]/design-spec/route.ts
+++ b/src/app/api/orders/[id]/design-spec/route.ts
@@ -40,10 +40,10 @@ export async function GET(req: Request, { params }: { params: { id: string } })
hPct: number;
};
- const printAreaStartX = DISPLAY * (printArea.xPct / 100);
- const printAreaStartY = DISPLAY * (printArea.yPct / 100);
- const printAreaWidthPx = DISPLAY * (printArea.wPct / 100);
- const printAreaHeightPx = DISPLAY * (printArea.hPct / 100);
+ const printAreaStartX = DISPLAY * printArea.xPct;
+ const printAreaStartY = DISPLAY * printArea.yPct;
+ const printAreaWidthPx = DISPLAY * printArea.wPct;
+ const printAreaHeightPx = DISPLAY * printArea.hPct;
// Scale: how many centimeters per pixel
// printAreaWidthMm / printAreaWidthPx = mm/px
@@ -77,7 +77,7 @@ export async function GET(req: Request, { params }: { params: { id: string } })
Design on product with measurement guides

-
━━ Red dashed line: Print area boundary
-
━ Blue line: X-axis (horizontal, 0cm at left)
-
━ Green line: Y-axis (vertical, 0cm at top)
-
● Orange circles: Element positions (E1, E2, etc.)
+
━ Blue line: X-axis (horizontal, 0cm at left edge)
+
━ Green line: Y-axis (vertical, 0cm at top edge)
+
┊ Brown dashed lines: Position guides from edges to element center
+
T: / L: Distance from top and left edges of garment in cm
+
● Orange circles: Design element positions (E1, E2, etc.)
` : ''}
@@ -116,7 +141,9 @@ export async function GET(req: Request, { params }: { params: { id: string } })
Element |
Type |
Position (CM) |
+ Position (px) |
Size (CM) |
+ Size (px) |
Details |
@@ -126,7 +153,9 @@ export async function GET(req: Request, { params }: { params: { id: string } })
E${idx + 1} |
${el.type === 'text' ? '📝 Text' : '🖼️ Image'} |
X: ${convertPositionToCm(el.x, printAreaStartX)} | Y: ${convertPositionToCm(el.y, printAreaStartY)} |
+ X: ${Math.round(el.x - printAreaStartX)} | Y: ${Math.round(el.y - printAreaStartY)} |
${el.type === 'image' ? `${convertToCm(el.width)} × ${convertToCm(el.height)}` : 'N/A'} |
+ ${el.type === 'image' ? `${Math.round(el.width)} × ${Math.round(el.height)}` : 'N/A'} |
${el.type === 'text' ? `
Font: ${el.fontFamily}, ${Math.round(el.fontSize * cmPerPx * 2.834)}pt
|