From e3e17203cf66e2437855281b0a6a515fdfb45b5b Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 4 Dec 2012 11:25:48 -0500 Subject: [PATCH] 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. --- js/id/actions/modes.js | 4 ---- js/id/renderer/map.js | 1 - 2 files changed, 5 deletions(-) diff --git a/js/id/actions/modes.js b/js/id/actions/modes.js index df318c50d..d30441b85 100644 --- a/js/id/actions/modes.js +++ b/js/id/actions/modes.js @@ -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() { diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 02cf80961..1a3134e97 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -600,7 +600,6 @@ iD.Map = function() { map.background = background; map.projection = projection; - map.redraw = redraw; map.selectEntity = selectEntity; map.dblclickEnable = dblclickEnable;