Skip to content

feat(web): add fit-to-label maximize tool and label-proportional QR/barcode sizing - #38

Open
phanex wants to merge 1 commit into
tomLadder:mainfrom
phanex:feat/fit-and-maximize-elements
Open

feat(web): add fit-to-label maximize tool and label-proportional QR/barcode sizing#38
phanex wants to merge 1 commit into
tomLadder:mainfrom
phanex:feat/fit-and-maximize-elements

Conversation

@phanex

@phanex phanex commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Adds a Fit to Label / Maximize button to the Transform section and fixes initial QR code & Barcode creation sizes to scale proportionally with label dimensions.

Key Changes

  • Transform Section: Added Maximize button alongside alignment controls. Fits elements to 90% of label dimensions with 10% margin, preserving aspect ratio for images/QR codes.
  • Dynamic Barcode Scaling: Solved number squishing/distortion by dynamically calculating single bar module width (targetBarWidth) and font size in JsBarcode based on element width/height.
  • Initial Element Sizing: Updated QR Code and Barcode creation in keyboard.ts to scale proportionally with label dimensions instead of spawning hardcoded off-label dimensions.

@phanex
phanex force-pushed the feat/fit-and-maximize-elements branch from 4ebc71a to 2d59364 Compare August 30, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant