Fix diagonal line in top-left — arrow animation now only runs when visible, hidden by default

This commit is contained in:
Justin Oros
2026-05-20 12:16:42 -07:00
parent a3dfc5f822
commit b314882018
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -440,11 +440,12 @@ class Game {
_updateDirArrow(nearNPC) {
const arrow = document.getElementById('map-dir-arrow');
if (!arrow) return;
if (nearNPC) { arrow.style.display = 'none'; return; }
if (nearNPC) { arrow.style.display = 'none'; arrow.style.animation = 'none'; return; }
const world = document.getElementById('map-inner');
const viewH = world ? world.parentElement.offsetHeight : 300;
arrow.textContent = '▶';
arrow.style.display = 'block';
arrow.style.animation = 'arrowPulse .7s ease-in-out infinite';
arrow.style.removeProperty('left');
arrow.style.bottom = (viewH * 0.28) + 'px';
}