Map#pan redraws

This commit is contained in:
John Firebaugh
2013-02-12 21:19:02 -08:00
parent 95e6b840ee
commit 65fbc808a1
5 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ iD.behavior.DragNode = function(context) {
function startNudge(nudge) {
if (nudgeInterval) window.clearInterval(nudgeInterval);
nudgeInterval = window.setInterval(function() {
context.map().pan(nudge).redraw();
context.pan(nudge);
}, 50);
}
+1
View File
@@ -85,6 +85,7 @@ window.iD = function () {
context.projection = map.projection;
context.tail = map.tail;
context.redraw = map.redraw;
context.pan = map.pan;
context.zoomIn = map.zoomIn;
context.zoomOut = map.zoomOut;
+1 -1
View File
@@ -30,7 +30,7 @@ iD.modes.MoveWay = function(context, wayId) {
function startNudge(nudge) {
if (nudgeInterval) window.clearInterval(nudgeInterval);
nudgeInterval = window.setInterval(function() {
context.map().pan(nudge).redraw();
context.pan(nudge);
}, 50);
}
+1 -1
View File
@@ -241,7 +241,7 @@ iD.Map = function(context) {
t[1] += d[1];
projection.translate(t);
zoom.translate(projection.translate());
return map;
return redraw();
};
map.size = function(_) {
+2 -4
View File
@@ -2,8 +2,7 @@ iD.ui = function(context) {
return function(container) {
context.container(container);
var connection = context.connection(),
history = context.history(),
var history = context.history(),
map = context.map();
if (!iD.detect().support) {
@@ -103,8 +102,7 @@ iD.ui = function(context) {
function pan(d) {
return function() {
map.pan(d);
map.redraw();
context.pan(d);
};
}