Force redraw on zoom to fix HW Accel blur

This commit is contained in:
Pyro Nicampt committed 2025-01-04 01:34:10 -06:00
1 parent 7886fc2303
commit 2156ab0760
3 files changed
+16 -1

No files matched your search

+6
View File
@@ -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.
*/