Skip to content

Feat/double-click inster#8

Merged
u8array merged 2 commits intomainfrom
feat/codabar-stop-char-normalization
May 1, 2026
Merged

Feat/double-click inster#8
u8array merged 2 commits intomainfrom
feat/codabar-stop-char-normalization

Conversation

@u8array
Copy link
Copy Markdown
Owner

@u8array u8array commented May 1, 2026

No description provided.

u8array added 2 commits May 1, 2026 22:40
Add new barcode symbologies to the README, and update the instruction
for adding objects.
Allow users to quickly add an object to the label by double-clicking on
its
entry in the object palette. The object is centered by default.
@u8array u8array merged commit 282fa38 into main May 1, 2026
2 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a double-click interaction to add objects to the center of the canvas and updates the documentation to include a wider range of supported barcode types. The review feedback suggests restoring the ZPL command codes in the README for better user reference and rounding the calculated center coordinates to integers to prevent potential issues with non-integer values in ZPL generation.

Comment thread README.md

- **Text:** `^A0`, `^A*` (all bitmap fonts), `^A@` (TrueType, best-effort sizing), `^CF`, `^FW`, `^FB` (field block, including `\&` line breaks), `^TB`, `^FH` (hex escapes)
- **Barcodes:** `^BC` (Code 128), `^B3` (Code 39), `^BA` (Code 93), `^B2` (I2of5), `^BE` (EAN-13), `^B8` (EAN-8), `^BU` (UPC-A), `^B9` (UPC-E), `^BQ` (QR Code), `^BX` (DataMatrix), `^B7` (PDF417)
- **Barcodes:** Code 128, Code 39, Code 93, Code 11, Interleaved 2 of 5, Standard 2 of 5, Industrial 2 of 5, Codabar, LOGMARS, MSI, Plessey, GS1 Databar, Planet Code, Postal/POSTNET, EAN-13, EAN-8, UPC-A, UPC-E, QR Code, DataMatrix, PDF417, MicroPDF417, Aztec, Codablock F
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The removal of ZPL command codes (e.g., ^BC, ^B3) from the parser documentation makes it harder for users to identify which commands are supported during import. It is better to keep these references alongside the barcode names for clarity.

Suggested change
- **Barcodes:** Code 128, Code 39, Code 93, Code 11, Interleaved 2 of 5, Standard 2 of 5, Industrial 2 of 5, Codabar, LOGMARS, MSI, Plessey, GS1 Databar, Planet Code, Postal/POSTNET, EAN-13, EAN-8, UPC-A, UPC-E, QR Code, DataMatrix, PDF417, MicroPDF417, Aztec, Codablock F
- **Barcodes:** `^BC` (Code 128), `^B3` (Code 39), `^BA` (Code 93), `^B1` (Code 11), `^B2` (Interleaved 2 of 5), `^BJ` (Standard 2 of 5), `^BI` (Industrial 2 of 5), `^BK` (Codabar), `^BL` (LOGMARS), `^BM` (MSI), `^BP` (Plessey), `^BR` (GS1 Databar), `^B5` (Planet Code), `^BZ` (Postal/POSTNET), `^BE` (EAN-13), `^B8` (EAN-8), `^BU` (UPC-A), `^B9` (UPC-E), `^BQ` (QR Code), `^BX` (DataMatrix), `^B7` (PDF417), `^BF` (MicroPDF417), `^B0` (Aztec), `^BB` (Codablock F)

Comment on lines +25 to +28
addObject(type, {
x: mmToDots(label.widthMm, label.dpmm) / 2,
y: mmToDots(label.heightMm, label.dpmm) / 2,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

ZPL coordinates must be integers. While mmToDots returns a rounded value, dividing it by 2 can result in a float (e.g., if the dot width is odd). The final coordinates should be rounded to ensure valid ZPL generation and consistent rendering.

Suggested change
addObject(type, {
x: mmToDots(label.widthMm, label.dpmm) / 2,
y: mmToDots(label.heightMm, label.dpmm) / 2,
});
addObject(type, {
x: Math.round(mmToDots(label.widthMm, label.dpmm) / 2),
y: Math.round(mmToDots(label.heightMm, label.dpmm) / 2),
});

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