diff --git a/index.html b/index.html index 1dee6c5..c079a32 100644 --- a/index.html +++ b/index.html @@ -230,7 +230,7 @@
- DV Community Map + DV Community Map
diff --git a/index.js b/index.js index 85ae8f5..81f3648 100644 --- a/index.js +++ b/index.js @@ -56,6 +56,7 @@ const zoomLevelDisplay = document.getElementById('zoomLevelDisplay'); const zoomStyle = document.getElementById('zoomStyle'); const styleRoot = document.querySelector(':root'); const svgns = map.getAttribute('xmlns'); +const redrawTriggerElement = document.getElementById('redrawTrigger'); const map_rails = document.createElementNS(svgns, 'g'); map_rails.setAttribute('id', 'map_rails'); @@ -256,9 +257,14 @@ function updateMapview(){ zoomStyle.innerHTML = dynamicStyles.join('\n'); } previousMapScale = mapNav.scale; + forceRedraw(); } } +function forceRedraw(){ + redrawTriggerElement.style.backgroundColor = Color.random().hex; +} + /** Get the bounding box of all the tracks, and set the map bounds accordingly. Also flips the Y axis. * **Note:** Does NOT evaluate beziers, uses the control points only. */ diff --git a/style.css b/style.css index 7819516..3cfa957 100644 --- a/style.css +++ b/style.css @@ -99,6 +99,15 @@ a:visited{ pointer-events: all; } +#redrawTrigger{ + transition: background-color 800ms; + display: inline-block; + width: 1px; + height: 5px; + background-color: #000; + opacity: 0.01; +} + #settingsPanel{ user-select: none; input, label{