circuit-to-svg 0.0.106 → 0.0.107
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 +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -330,7 +330,8 @@ function createSvgObjectsFromPcbSilkscreenText(pcbSilkscreenText, transform) {
|
|
|
330
330
|
anchor_position,
|
|
331
331
|
text,
|
|
332
332
|
font_size = 1,
|
|
333
|
-
layer = "top"
|
|
333
|
+
layer = "top",
|
|
334
|
+
ccw_rotation = 0
|
|
334
335
|
} = pcbSilkscreenText;
|
|
335
336
|
if (!anchor_position || typeof anchor_position.x !== "number" || typeof anchor_position.y !== "number") {
|
|
336
337
|
console.error("Invalid anchor_position:", anchor_position);
|
|
@@ -343,7 +344,7 @@ function createSvgObjectsFromPcbSilkscreenText(pcbSilkscreenText, transform) {
|
|
|
343
344
|
const transformedFontSize = font_size * Math.abs(transform.a);
|
|
344
345
|
const textTransform = compose2(
|
|
345
346
|
translate2(transformedX, transformedY),
|
|
346
|
-
rotate2(Math.PI / 180)
|
|
347
|
+
rotate2(ccw_rotation * Math.PI / 180)
|
|
347
348
|
// Convert degrees to radians
|
|
348
349
|
);
|
|
349
350
|
const svgObject = {
|