diff options
| author | dax <me@dax.ist> | 2026-08-04 10:14:08 +0000 |
|---|---|---|
| committer | dax <me@dax.ist> | 2026-08-04 10:14:08 +0000 |
| commit | 6261bf6fcd96a9c4380f2361a79afdae840d0aaa (patch) | |
| tree | a72a04b45a718130866e77f3345ca48e9311ccf6 /public/app.js | |
| parent | a35909c6b15402174f364be372ad2dad83a39441 (diff) | |
pathways: replace floating edge chevrons with full-edge glow segments on the tile
the arrows in the gap were pointless - that is exactly where the ghost
photo preview appears, so they only collided with it. now the current tile
shows a thin glowing segment running corner-to-corner along each free edge,
drawn ON the tile just inside the border: subtle at rest, bright on hover,
fades out while its preview ghost is showing. occupied directions get no
segment. the ghost still renders in the gap, so nothing overlaps it.
Diffstat (limited to 'public/app.js')
| -rw-r--r-- | public/app.js | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/public/app.js b/public/app.js index 35d9898..5034348 100644 --- a/public/app.js +++ b/public/app.js @@ -12,12 +12,6 @@ const MIN_ZOOM = 0.05 const MAX_ZOOM = 5 const EPS = 0.5 const MAX_ZONE_TILES = 24 -const ARROW_SVG = { - N: '<svg viewBox="0 0 24 24" fill="none"><path d="M5 15l7-8 7 8" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/></svg>', - E: '<svg viewBox="0 0 24 24" fill="none"><path d="M9 5l8 7-8 7" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/></svg>', - S: '<svg viewBox="0 0 24 24" fill="none"><path d="M5 9l7 8 7-8" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/></svg>', - W: '<svg viewBox="0 0 24 24" fill="none"><path d="M15 5l-8 7 8 7" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/></svg>', -} let U = 300 const tiles = new Map() @@ -222,10 +216,9 @@ function renderNav(id) { zone.addEventListener("pointerdown", (e) => e.stopPropagation()) zone.addEventListener("click", (e) => { e.stopPropagation(); traverseFrom(id, ex.dir) }) if (!adjacentTile(id, ex.dir) && isCurrent) { - const chev = document.createElement("div") - chev.className = "nav-chev" - chev.innerHTML = ARROW_SVG[ex.dir] - zone.appendChild(chev) + const edge = document.createElement("div") + edge.className = `nav-edge nav-edge-${ex.dir}` + zone.appendChild(edge) } nav.appendChild(zone) } |
