circuit-to-svg 0.0.130 → 0.0.132
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 +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -655,7 +655,7 @@ function createSvgObjectsFromPcbSilkscreenText(pcbSilkscreenText, transform) {
|
|
|
655
655
|
transform: matrixToString2(textTransform),
|
|
656
656
|
class: `pcb-silkscreen-text pcb-silkscreen-${layer}`,
|
|
657
657
|
"data-pcb-silkscreen-text-id": pcbSilkscreenText.pcb_component_id,
|
|
658
|
-
stroke:
|
|
658
|
+
stroke: "none"
|
|
659
659
|
},
|
|
660
660
|
children: [
|
|
661
661
|
{
|
|
@@ -2378,7 +2378,12 @@ function getSchematicBoundsFromCircuitJson(soup, padding = 0.5) {
|
|
|
2378
2378
|
updateBounds(edge.to, { width: 0.1, height: 0.1 }, 0);
|
|
2379
2379
|
}
|
|
2380
2380
|
} else if (item.type === "schematic_text") {
|
|
2381
|
-
|
|
2381
|
+
const textType = "reference_designator";
|
|
2382
|
+
const fontSize = getSchMmFontSize(textType, item.font_size) ?? 0.18;
|
|
2383
|
+
const text = item.text ?? "";
|
|
2384
|
+
const width = text.length * fontSize;
|
|
2385
|
+
const height = fontSize;
|
|
2386
|
+
updateBounds(item.position, { width, height }, item.rotation ?? 0);
|
|
2382
2387
|
} else if (item.type === "schematic_voltage_probe") {
|
|
2383
2388
|
updateBounds(item.position, { width: 0.2, height: 0.4 }, 0);
|
|
2384
2389
|
} else if (item.type === "schematic_box") {
|