From 4a574041a91a06718fa17cf5cf18c0b1c51ae282 Mon Sep 17 00:00:00 2001 From: WuYongJie Date: Sat, 5 Sep 2026 11:53:55 +0800 Subject: [PATCH] fix(barcode-print): restore Sofia certificate row pitch --- .../barcode-print/barcodePrintCertificate.test.ts | 4 ++-- .../barcodePrintSofiaCertificateLayout.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/furniture-3d-system/src/app/intake/barcode-print/barcodePrintCertificate.test.ts b/furniture-3d-system/src/app/intake/barcode-print/barcodePrintCertificate.test.ts index b91986b7..fd5f3ac7 100644 --- a/furniture-3d-system/src/app/intake/barcode-print/barcodePrintCertificate.test.ts +++ b/furniture-3d-system/src/app/intake/barcode-print/barcodePrintCertificate.test.ts @@ -34,12 +34,12 @@ describe("Sofia certificate field positioning", () => { expect(values.map((value) => value.style.top)).toEqual( SOFIA_CERTIFICATE_FIELD_TOPS.map((top) => `${top}px`), ); - expect(SOFIA_CERTIFICATE_FIELD_LINE_TOPS).toEqual([260, 313, 366, 419, 472, 525]); + expect(SOFIA_CERTIFICATE_FIELD_LINE_TOPS).toEqual([260, 326, 392, 458, 524, 590]); expect( SOFIA_CERTIFICATE_FIELD_LINE_TOPS.slice(1).map( (top, index) => top - SOFIA_CERTIFICATE_FIELD_LINE_TOPS[index], ), - ).toEqual(Array(5).fill(53)); + ).toEqual(Array(5).fill(66)); expect(values.map((value) => value.style.left)).toEqual(Array(6).fill("310px")); expect(values.map((value) => value.textContent)).toEqual([ "书架-经典北美黑胡桃色", diff --git a/furniture-3d-system/src/app/intake/barcode-print/barcodePrintSofiaCertificateLayout.ts b/furniture-3d-system/src/app/intake/barcode-print/barcodePrintSofiaCertificateLayout.ts index 2460771b..74e9808c 100644 --- a/furniture-3d-system/src/app/intake/barcode-print/barcodePrintSofiaCertificateLayout.ts +++ b/furniture-3d-system/src/app/intake/barcode-print/barcodePrintSofiaCertificateLayout.ts @@ -10,8 +10,14 @@ export const SOFIA_CERTIFICATE_FIELD_LEFT = 310 as const; export const SOFIA_CERTIFICATE_FIELD_FONT_SIZE = 26 as const; export const SOFIA_CERTIFICATE_FIELD_LINE_HEIGHT = 32 as const; -/** The y-coordinate of each pre-printed underline in canvas pixels. */ -export const SOFIA_CERTIFICATE_FIELD_LINE_TOPS = [260, 313, 366, 419, 472, 525] as const; +/** + * The y-coordinate of each pre-printed underline in canvas pixels. + * + * Warehouse print feedback confirmed the first row at 260px and a 66px + * physical row pitch. Keep the pitch intact so later values do not drift + * progressively above their pre-printed labels. + */ +export const SOFIA_CERTIFICATE_FIELD_LINE_TOPS = [260, 326, 392, 458, 524, 590] as const; /** * Dynamic values sit above the underline. The line-height is the text box