Merge branch 'performance-improvement-debounce-redraw' of https://github.com/guillaume/iD into guillaume-performance-improvement-debounce-redraw

This commit is contained in:
Bryan Housel
2016-10-30 13:00:11 -04:00
+1 -6
View File
@@ -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) {