Fixed arrows

This commit is contained in:
2026-03-28 09:10:02 +01:00
parent a3707f25b3
commit 157a723711
2 changed files with 12 additions and 2 deletions

View File

@@ -28,11 +28,20 @@ const pathEls = CONNECTIONS.map(() => {
// r1 = bounding rect of source, r2 = bounding rect of target
// Both rects are relative to the scene container.
function manhattanPath(r1, r2) {
const x1 = r1.left + r1.width / 2; // bottom-center of source
let x1 = r1.left + r1.width / 2; // bottom-center of source
const y1 = r1.top + r1.height + 10;
const x2 = r2.left + r2.width / 2; // top-center of target
let x2 = r2.left + r2.width / 2; // top-center of target
const y2 = r2.top + 5; // stop 8px above target (arrowhead gap)
let shift = 5;
if (x1 > x2) {
x1 -= shift;
x2 += shift;
} else if (x2 > x1) {
x1 += shift;
x2 -= shift;
}
const ymid = y1 + (y2 - y1) / 2; // elbow halfway between the two
// M: move to source bottom

View File

@@ -26,6 +26,7 @@ a {
font-family: "fmono";
max-width: 300px;
filter: drop-shadow(5px 5px 4px #707070);
height: fit-content;
}
.disboxp {