mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
Remove Map#redraw calls from modes
Map#redraw no longer accepts an argument, and changes to the history automatically trigger a redraw. It should be possible to calculate a set of changed entities between two history versions, and redraw only those entities.
This commit is contained in:
@@ -173,8 +173,6 @@ iD.modes.DrawRoad = function(way_id, direction) {
|
||||
lon: ll[0], lat: ll[1]
|
||||
});
|
||||
this.history.replace(iD.actions.addWayNode(way, node));
|
||||
var only = iD.Util.trueObj([way.id].concat(_.pluck(way.nodes, 'id')));
|
||||
this.map.redraw(only);
|
||||
}
|
||||
|
||||
function click() {
|
||||
@@ -319,8 +317,6 @@ iD.modes.DrawArea = function(way_id) {
|
||||
lat: ll[1]
|
||||
});
|
||||
this.history.replace(iD.actions.addWayNode(way, node));
|
||||
var only = iD.Util.trueObj([way.id].concat(_.pluck(way.nodes, 'id')));
|
||||
this.map.redraw(only);
|
||||
}
|
||||
|
||||
function click() {
|
||||
|
||||
@@ -600,7 +600,6 @@ iD.Map = function() {
|
||||
|
||||
map.background = background;
|
||||
map.projection = projection;
|
||||
map.redraw = redraw;
|
||||
map.selectEntity = selectEntity;
|
||||
map.dblclickEnable = dblclickEnable;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user