build-dxf 0.1.86 → 0.1.87
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/package.json +1 -1
- package/src/build.js +3 -3
package/package.json
CHANGED
package/src/build.js
CHANGED
|
@@ -2594,7 +2594,7 @@ class Point {
|
|
|
2594
2594
|
}
|
|
2595
2595
|
return num;
|
|
2596
2596
|
}
|
|
2597
|
-
hashCode(fixed =
|
|
2597
|
+
hashCode(fixed = 4) {
|
|
2598
2598
|
return `${this.x.toFixed(fixed)},${this.y.toFixed(6)}`;
|
|
2599
2599
|
}
|
|
2600
2600
|
/**
|
|
@@ -7911,11 +7911,11 @@ class CAD {
|
|
|
7911
7911
|
function drawRulerLine(p1, p2) {
|
|
7912
7912
|
line.set(p1, p2);
|
|
7913
7913
|
const length = line.length();
|
|
7914
|
-
const angle = line.direction().
|
|
7914
|
+
const angle = line.direction().angle(new Point(0, 1), { unit: "degree", range: "180" });
|
|
7915
7915
|
const p1C = p1.clone();
|
|
7916
7916
|
const p2C = p2.clone();
|
|
7917
7917
|
const offset = expansionWidth * 0.4;
|
|
7918
|
-
if (
|
|
7918
|
+
if (Math.min(angle, 180 - angle) < 1) {
|
|
7919
7919
|
if (p1.x < center.x) {
|
|
7920
7920
|
p1C.x = box.minX + offset;
|
|
7921
7921
|
p2C.x = box.minX + offset;
|