Repository navigation
Commit 878d69c
committed
fix(line): clamp thickness <= length to avoid ^GB promotion
Zebra firmware promotes ^GB w,h,t with t > min(w,h) to max(w,t) x max(h,t),
so a vertical line emitted as ^GB t,length,t prints as a t x t square once
thickness exceeds length rather than the declared length x t band. Enforce
the t <= length invariant at every edit path:
- Thickness side-handle drag caps at p.length
- Property panel thickness gets max=p.length, length gets min=p.thickness
(NumberInput already clamps typed values, so the cap is authoritative)
- Start/end handle drag commits cap thickness to the new length so
shrinking a line below its current thickness pulls thickness down
rather than violating the invariant
Existing stored lines with t > length keep their data and continue to
print the promoted square; touching any handle or input snaps them back
into a valid state. An explicit import-time warning for this case will
follow in a separate change.1 parent e4d9cd4 commit 878d69c
2 files changed
Lines changed: 31 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
462 | 466 | | |
463 | 467 | | |
464 | 468 | | |
465 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
466 | 474 | | |
467 | 475 | | |
468 | 476 | | |
| |||
520 | 528 | | |
521 | 529 | | |
522 | 530 | | |
523 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
524 | 538 | | |
525 | 539 | | |
526 | 540 | | |
| |||
549 | 563 | | |
550 | 564 | | |
551 | 565 | | |
552 | | - | |
553 | | - | |
554 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
555 | 573 | | |
556 | 574 | | |
557 | 575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
130 | 133 | | |
| |||
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
143 | 150 | | |
144 | 151 | | |
145 | 152 | | |
| |||
0 commit comments