circuit-to-canvas 0.0.33 → 0.0.34
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 +2 -8
- package/lib/drawer/shapes/dimension-line.ts +2 -8
- package/package.json +1 -1
- package/tests/elements/__snapshots__/pcb-fabrication-note-dimension.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-note-dimension-angled-and-vertical.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-note-dimension-basic.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-note-dimension-vertical.snap.png +0 -0
- package/tests/elements/__snapshots__/pcb-note-dimension-with-offset.snap.png +0 -0
- package/tests/shapes/__snapshots__/dimension-line.snap.png +0 -0
package/dist/index.js
CHANGED
|
@@ -1673,14 +1673,8 @@ function drawDimensionLine(params) {
|
|
|
1673
1673
|
};
|
|
1674
1674
|
const fromOffset = { x: from.x + offsetVector.x, y: from.y + offsetVector.y };
|
|
1675
1675
|
const toOffset = { x: to.x + offsetVector.x, y: to.y + offsetVector.y };
|
|
1676
|
-
const fromBase =
|
|
1677
|
-
|
|
1678
|
-
y: fromOffset.y + direction.y * arrowSize
|
|
1679
|
-
};
|
|
1680
|
-
const toBase = {
|
|
1681
|
-
x: toOffset.x - direction.x * arrowSize,
|
|
1682
|
-
y: toOffset.y - direction.y * arrowSize
|
|
1683
|
-
};
|
|
1676
|
+
const fromBase = fromOffset;
|
|
1677
|
+
const toBase = toOffset;
|
|
1684
1678
|
const scaleValue = Math.abs(realToCanvasMat.a);
|
|
1685
1679
|
const strokeWidth = manualStrokeWidth ?? arrowSize / 5;
|
|
1686
1680
|
const lineColor = color || "rgba(255,255,255,0.5)";
|
|
@@ -67,14 +67,8 @@ export function drawDimensionLine(params: DrawDimensionLineParams): void {
|
|
|
67
67
|
const fromOffset = { x: from.x + offsetVector.x, y: from.y + offsetVector.y }
|
|
68
68
|
const toOffset = { x: to.x + offsetVector.x, y: to.y + offsetVector.y }
|
|
69
69
|
|
|
70
|
-
const fromBase =
|
|
71
|
-
|
|
72
|
-
y: fromOffset.y + direction.y * arrowSize,
|
|
73
|
-
}
|
|
74
|
-
const toBase = {
|
|
75
|
-
x: toOffset.x - direction.x * arrowSize,
|
|
76
|
-
y: toOffset.y - direction.y * arrowSize,
|
|
77
|
-
}
|
|
70
|
+
const fromBase = fromOffset
|
|
71
|
+
const toBase = toOffset
|
|
78
72
|
|
|
79
73
|
const scaleValue = Math.abs(realToCanvasMat.a)
|
|
80
74
|
const strokeWidth = manualStrokeWidth ?? arrowSize / 5
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|