mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-03 21:48:03 +02:00
Map#pan redraws
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user