circuit-json-to-kicad 0.0.12 → 0.0.13
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 +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -665,12 +665,14 @@ var AddSchematicSymbolsStage = class extends ConverterStage {
|
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
667
|
const symbolCenter = symbol.center || { x: 0, y: 0 };
|
|
668
|
+
const isVertical = symbolName.includes("_down") || symbolName.includes("_up");
|
|
669
|
+
const horizontalTextOffset = isVertical ? 0.15 : 0;
|
|
668
670
|
const refTextPos = refTextPrimitive && this.ctx.c2kMatSch ? applyToPoint2(this.ctx.c2kMatSch, {
|
|
669
|
-
x: schematicComponent.center.x + (refTextPrimitive.x - symbolCenter.x),
|
|
671
|
+
x: schematicComponent.center.x + (refTextPrimitive.x - symbolCenter.x) + horizontalTextOffset,
|
|
670
672
|
y: schematicComponent.center.y + (refTextPrimitive.y - symbolCenter.y)
|
|
671
673
|
}) : { x: symbolKicadPos.x, y: symbolKicadPos.y - 6 };
|
|
672
674
|
const valTextPos = valTextPrimitive && this.ctx.c2kMatSch ? applyToPoint2(this.ctx.c2kMatSch, {
|
|
673
|
-
x: schematicComponent.center.x + (valTextPrimitive.x - symbolCenter.x),
|
|
675
|
+
x: schematicComponent.center.x + (valTextPrimitive.x - symbolCenter.x) + horizontalTextOffset,
|
|
674
676
|
y: schematicComponent.center.y + (valTextPrimitive.y - symbolCenter.y)
|
|
675
677
|
}) : { x: symbolKicadPos.x, y: symbolKicadPos.y + 6 };
|
|
676
678
|
return { refTextPos, valTextPos };
|