Fix measurement display and ruler rendering
- Add printAreaWidthMm and printAreaHeightMm to ProductDTO type - Include these fields in toProductDTO conversion function - Refactor ruler calculations to use simple for loops - Rulers now display correctly showing 2cm increments on both axes - Position & Size panel now shows accurate cm measurements Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
4658b5a8b8
commit
c20c696ccb
@@ -19,6 +19,8 @@ export function toProductDTO(p: PrismaProduct, activePromotions: ActivePromotion
|
||||
mockup: p.mockup,
|
||||
printArea: JSON.parse(p.printArea),
|
||||
printAreaBack: p.printAreaBack ? JSON.parse(p.printAreaBack) : null,
|
||||
printAreaWidthMm: p.printAreaWidthMm,
|
||||
printAreaHeightMm: p.printAreaHeightMm,
|
||||
imageUrl: p.imageUrl,
|
||||
imageUrlBack: p.imageUrlBack,
|
||||
photoRecolorable: p.photoRecolorable,
|
||||
|
||||
@@ -43,6 +43,8 @@ export type ProductDTO = {
|
||||
mockup: string;
|
||||
printArea: PrintArea;
|
||||
printAreaBack: PrintArea | null;
|
||||
printAreaWidthMm: number;
|
||||
printAreaHeightMm: number;
|
||||
imageUrl: string | null;
|
||||
imageUrlBack: string | null;
|
||||
photoRecolorable: boolean;
|
||||
|
||||
Reference in New Issue
Block a user