From 209af186b38cf8a8f75542c8a1aa4b9857f30283 Mon Sep 17 00:00:00 2001 From: Andymick Date: Sat, 18 Jul 2026 11:48:28 +0100 Subject: [PATCH] Add position and size display to personalization canvas - Display X and Y coordinates of selected elements - Show width and height of selected images in pixels - Add "Position & Size" panel below design controls - Helps users understand exact placement during design Users can now see precise measurements while personalizing instead of guessing or calculating after the fact. Co-Authored-By: Claude Haiku 4.5 --- src/components/DesignCanvas.tsx | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/components/DesignCanvas.tsx b/src/components/DesignCanvas.tsx index ad4127c..63535d0 100644 --- a/src/components/DesignCanvas.tsx +++ b/src/components/DesignCanvas.tsx @@ -777,6 +777,34 @@ export default function DesignCanvas({ product }: { product: ProductDTO }) { )} + {selected && ( +
+

Position & Size

+
+
+ X: + {Math.round(selected.x)} px +
+
+ Y: + {Math.round(selected.y)} px +
+ {selected.type === 'image' && ( + <> +
+ Width: + {Math.round(selected.width)} px +
+
+ Height: + {Math.round(selected.height)} px +
+ + )} +
+
+ )} + {selected?.type === 'text' && (
+
+ Size: + {Math.round(selected.width)} × {Math.round(selected.height)} px +