Skip to content

Commit 49cabd4

Browse files
committed
refactor: decouple composite svg from pdf417 renderer
1 parent 56954d2 commit 49cabd4

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

docs/gs1-composite-core.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ modules. CC-A and CC-B default to a row-height ratio of 2; CC-C defaults to 3.
8282
`rowHeight`, `moduleSize`, `margin`, `width`, `height`, colors, and the accessible
8383
label can be overridden. Set `background: null` for a transparent component.
8484

85-
`buildGs1CompositePath(modules, options)` is also exported. A future complete
85+
`buildGs1CompositePath(modules, options)` is also exported as a thin wrapper
86+
around the symbology-neutral `buildBarcodeMatrixPath` helper. A future complete
8687
Composite renderer can embed this path at an exact offset above a linear
87-
component without nesting a second SVG document.
88+
component without nesting a second SVG document. The Composite renderer does
89+
not import or instantiate the standalone PDF417 renderer.
8890

8991
## Shared PDF417 architecture
9092

libs/GS1CompositeSvg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Dependency-free SVG renderer for a native GS1 Composite 2D component matrix.
22

3-
import { buildPdf417Path } from './PDF417Svg.js'
3+
import { buildBarcodeMatrixPath } from './BarcodeMatrixSvg.js'
44

55
export class Gs1CompositeSvgRenderer {
66
static DEFAULT_STYLE = Object.freeze({
@@ -52,7 +52,7 @@ export class Gs1CompositeSvgRenderer {
5252
export const GS1CompositeSvgRenderer = Gs1CompositeSvgRenderer
5353

5454
export function buildGs1CompositePath(modules, options = {}) {
55-
return buildPdf417Path(modules, options)
55+
return buildBarcodeMatrixPath(modules, options)
5656
}
5757

5858
function normalizeStyle(style, result) {

0 commit comments

Comments
 (0)