Repository navigation
fix(gs1databar): canvas resize maps the width drag onto magnification - #582
Merged
Merged
Conversation
Owner
|
Since the PR is Devin-generated, I'll take it from here and push the remaining changes on top instead of a review round. |
u8array
force-pushed
the
fix/gs1databar-canvas-resize
branch
from
October 23, 2026 21:00
7fecd75 to
6c0f513
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GS1 DataBar showed no resize handles on the canvas:
heightLocked: trueshort-circuitsenabledAnchorsto[], disabling the transformer entirely. But only the height axis is firmware-fixed (Zebra overrides^BR hfor symbologies 1–5; Expanded Stacked uses it as per-row height) — the width axis is adjustable via^BRmagnification 1–10, which the properties panel already edits.Changes:
gs1databargains acommitTransformthat maps the rotation-aware width-axis scale ontomagnification, clamped to the^BR1–10 range.heightLockedcode-1dtype (middle-left/right for N/I, top/bottom-center for R/B — the bars turn a quarter).moduleWidthon^BYsymbologies,magnificationon GS1 DataBar) instead of hardcoding the name — so the drag quantises and re-renders per integer step exactly like the other 1D barcodes.heightLockedcode-1dtype must still commit the module-width axis (code-2dheightLocked types like MaxiCode keep skipping the transformer entirely, since^BDhas no size parameter at all).Test plan
pnpm test— newgs1databar.test.tscovers the commit contract (horizontal scaling, height ignored, 1–10 clamp, R/B axis swap);registry.test.tspins the invarianttsc -bandeslintcleanGenerated with Devin