Slow and fast redraw

This commit is contained in:
Tom MacWright
2013-01-22 14:17:27 -05:00
parent 1373acc080
commit 64445e50ac
+5 -3
View File
@@ -149,7 +149,7 @@ iD.Map = function() {
tilegroup.style(transformProp, transform);
surface.style(transformProp, transform);
redraw();
queueRedraw();
}
function resetTransform() {
@@ -158,7 +158,7 @@ iD.Map = function() {
tilegroup.style(transformProp, '');
}
var redraw = _.debounce(function(difference) {
function redraw(difference) {
resetTransform();
dispatch.move(map);
surface.attr('data-zoom', ~~map.zoom());
@@ -173,7 +173,9 @@ iD.Map = function() {
projection.scale(),
projection.translate().slice()];
return map;
}, 200);
}
var queueRedraw = _.debounce(redraw, 200);
function pointLocation(p) {
var translate = projection.translate(),