circuit-to-svg 0.0.177 → 0.0.178
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/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1495,7 +1495,7 @@ function getSoftwareUsedString(circuitJson) {
|
|
|
1495
1495
|
var package_default = {
|
|
1496
1496
|
name: "circuit-to-svg",
|
|
1497
1497
|
type: "module",
|
|
1498
|
-
version: "0.0.
|
|
1498
|
+
version: "0.0.177",
|
|
1499
1499
|
description: "Convert Circuit JSON to SVG",
|
|
1500
1500
|
main: "dist/index.js",
|
|
1501
1501
|
files: [
|
|
@@ -4458,12 +4458,18 @@ var createSvgObjectsFromSchematicComponentWithSymbol = ({
|
|
|
4458
4458
|
verticalOffset = -baseOffset * transformScale;
|
|
4459
4459
|
}
|
|
4460
4460
|
const dominantBaseline = text.anchor.includes("bottom") ? "auto" : text.anchor.includes("top") ? "hanging" : "middle";
|
|
4461
|
+
const isReferenceText = text.text === "{REF}";
|
|
4461
4462
|
svgObjects.push({
|
|
4462
4463
|
name: "text",
|
|
4463
4464
|
type: "element",
|
|
4464
4465
|
attributes: {
|
|
4465
4466
|
x: screenTextPos.x.toString(),
|
|
4466
4467
|
y: (screenTextPos.y + verticalOffset).toString(),
|
|
4468
|
+
...isReferenceText ? {
|
|
4469
|
+
stroke: colorMap2.schematic.background,
|
|
4470
|
+
"stroke-width": `${getSchStrokeSize(realToScreenTransform)}px`,
|
|
4471
|
+
"paint-order": "stroke"
|
|
4472
|
+
} : {},
|
|
4467
4473
|
fill: colorMap2.schematic.label_local,
|
|
4468
4474
|
"font-family": "sans-serif",
|
|
4469
4475
|
"text-anchor": ninePointAnchorToTextAnchor2[text.anchor],
|
|
@@ -6109,8 +6115,8 @@ function convertCircuitJsonToSchematicSvg(circuitJson, options) {
|
|
|
6109
6115
|
}
|
|
6110
6116
|
svgChildren.push(
|
|
6111
6117
|
...schDebugObjectSvgs,
|
|
6112
|
-
...schComponentSvgs,
|
|
6113
6118
|
...schTraceSvgs,
|
|
6119
|
+
...schComponentSvgs,
|
|
6114
6120
|
...schPortHoverSvgs,
|
|
6115
6121
|
...schNetLabel,
|
|
6116
6122
|
...schText,
|