Conversation
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.
There was a problem hiding this comment.
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.
|
|
||
| - **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 |
There was a problem hiding this comment.
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.
| - **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) |
| addObject(type, { | ||
| x: mmToDots(label.widthMm, label.dpmm) / 2, | ||
| y: mmToDots(label.heightMm, label.dpmm) / 2, | ||
| }); |
There was a problem hiding this comment.
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.
| 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), | |
| }); |
No description provided.