diff options
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) } |
