@tscircuit/core 0.0.173 → 0.0.174
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 +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1638,9 +1638,9 @@ function getRelativeDirection(pointA, pointB) {
|
|
|
1638
1638
|
const dx = pointB.x - pointA.x;
|
|
1639
1639
|
const dy = pointB.y - pointA.y;
|
|
1640
1640
|
if (Math.abs(dx) > Math.abs(dy)) {
|
|
1641
|
-
return dx
|
|
1641
|
+
return dx >= 0 ? "right" : "left";
|
|
1642
1642
|
}
|
|
1643
|
-
return dy
|
|
1643
|
+
return dy >= 0 ? "up" : "down";
|
|
1644
1644
|
}
|
|
1645
1645
|
|
|
1646
1646
|
// lib/components/primitive-components/Port.ts
|
|
@@ -1860,15 +1860,16 @@ var Port = class extends PrimitiveComponent {
|
|
|
1860
1860
|
label: "obstacle"
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
|
-
if (!localPortInfo?.side)
|
|
1863
|
+
if (!localPortInfo?.side) {
|
|
1864
1864
|
this.facingDirection = getRelativeDirection(containerCenter, portCenter);
|
|
1865
|
-
else
|
|
1865
|
+
} else {
|
|
1866
1866
|
this.facingDirection = {
|
|
1867
1867
|
left: "left",
|
|
1868
1868
|
right: "right",
|
|
1869
1869
|
top: "up",
|
|
1870
1870
|
bottom: "down"
|
|
1871
1871
|
}[localPortInfo.side];
|
|
1872
|
+
}
|
|
1872
1873
|
const sourcePort = db.source_port.get(this.source_port_id);
|
|
1873
1874
|
let bestDisplayPinLabel = void 0;
|
|
1874
1875
|
for (const portHint of sourcePort?.port_hints ?? []) {
|