Force redraw on zoom to fix HW Accel blur
This commit is contained in:
1 parent
7886fc2303
commit
2156ab0760
3 files changed
+16
-1
No files matched your search
+1
-1
@@ -230,7 +230,7 @@
|
|||||||
<div id="topleft">
|
<div id="topleft">
|
||||||
<div id="headerbar" class="panel orange">
|
<div id="headerbar" class="panel orange">
|
||||||
<div>
|
<div>
|
||||||
DV Community Map
|
<span id="redrawTrigger"></span>DV Community Map
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="legend">
|
<div id="legend">
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ const zoomLevelDisplay = document.getElementById('zoomLevelDisplay');
|
|||||||
const zoomStyle = document.getElementById('zoomStyle');
|
const zoomStyle = document.getElementById('zoomStyle');
|
||||||
const styleRoot = document.querySelector(':root');
|
const styleRoot = document.querySelector(':root');
|
||||||
const svgns = map.getAttribute('xmlns');
|
const svgns = map.getAttribute('xmlns');
|
||||||
|
const redrawTriggerElement = document.getElementById('redrawTrigger');
|
||||||
|
|
||||||
const map_rails = document.createElementNS(svgns, 'g');
|
const map_rails = document.createElementNS(svgns, 'g');
|
||||||
map_rails.setAttribute('id', 'map_rails');
|
map_rails.setAttribute('id', 'map_rails');
|
||||||
@@ -256,9 +257,14 @@ function updateMapview(){
|
|||||||
zoomStyle.innerHTML = dynamicStyles.join('\n');
|
zoomStyle.innerHTML = dynamicStyles.join('\n');
|
||||||
}
|
}
|
||||||
previousMapScale = mapNav.scale;
|
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.
|
/** 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.
|
* **Note:** Does NOT evaluate beziers, uses the control points only.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -99,6 +99,15 @@ a:visited{
|
|||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#redrawTrigger{
|
||||||
|
transition: background-color 800ms;
|
||||||
|
display: inline-block;
|
||||||
|
width: 1px;
|
||||||
|
height: 5px;
|
||||||
|
background-color: #000;
|
||||||
|
opacity: 0.01;
|
||||||
|
}
|
||||||
|
|
||||||
#settingsPanel{
|
#settingsPanel{
|
||||||
user-select: none;
|
user-select: none;
|
||||||
input, label{
|
input, label{
|
||||||
|
|||||||
Reference in new issue
Block a user