mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Merge branch 'performance-improvement-debounce-redraw' of https://github.com/guillaume/iD into guillaume-performance-improvement-debounce-redraw
This commit is contained in:
@@ -266,8 +266,6 @@ export function rendererMap(context) {
|
||||
function redraw(difference, extent) {
|
||||
if (!surface || !redrawEnabled) return;
|
||||
|
||||
clearTimeout(timeoutId);
|
||||
|
||||
// If we are in the middle of a zoom/pan, we can't do differenced redraws.
|
||||
// It would result in artifacts where differenced entities are redrawn with
|
||||
// one transform and unchanged entities with another.
|
||||
@@ -302,10 +300,7 @@ export function rendererMap(context) {
|
||||
}
|
||||
|
||||
|
||||
var timeoutId;
|
||||
function queueRedraw() {
|
||||
timeoutId = setTimeout(function() { redraw(); }, 750);
|
||||
}
|
||||
var queueRedraw = _.debounce(redraw, 750);
|
||||
|
||||
|
||||
function pointLocation(p) {
|
||||
|
||||
Reference in New Issue
Block a user