circuit-to-svg 0.0.139 → 0.0.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,6 +55,8 @@ Converts a PCB layout description to an SVG string.
|
|
|
55
55
|
- `width` and `height` – dimensions of the output SVG. Defaults to `800x600`.
|
|
56
56
|
- `matchBoardAspectRatio` – if `true`, adjust the SVG dimensions so the
|
|
57
57
|
resulting aspect ratio matches the `pcb_board` found in the circuit JSON.
|
|
58
|
+
- `backgroundColor` – fill color for the SVG background rectangle. Defaults to
|
|
59
|
+
`"#000"`.
|
|
58
60
|
|
|
59
61
|
## Contributing
|
|
60
62
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1455,7 +1455,7 @@ function convertCircuitJsonToPcbSvg(circuitJson, options) {
|
|
|
1455
1455
|
class: "boundary",
|
|
1456
1456
|
x: "0",
|
|
1457
1457
|
y: "0",
|
|
1458
|
-
fill: "#000",
|
|
1458
|
+
fill: options?.backgroundColor ?? "#000",
|
|
1459
1459
|
width: svgWidth.toString(),
|
|
1460
1460
|
height: svgHeight.toString()
|
|
1461
1461
|
}
|