From 4371dc4ace29cc36bbe9f2e9124823b8272388d1 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 20 Nov 2012 17:24:19 -0500 Subject: [PATCH] Do not redraw tiles when in only mode --- js/iD/renderer/Map.js | 6 ++++-- js/iD/renderer/tiles.js | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/js/iD/renderer/Map.js b/js/iD/renderer/Map.js index 6a72b6617..b8797c5b2 100644 --- a/js/iD/renderer/Map.js +++ b/js/iD/renderer/Map.js @@ -432,8 +432,10 @@ iD.Map = function(elem) { }); function redraw(only) { - dispatch.move(map); - tileclient.redraw(); + if (!only) { + dispatch.move(map); + tileclient.redraw(); + } if (getZoom() > 16) { download(); drawVector(only); diff --git a/js/iD/renderer/tiles.js b/js/iD/renderer/tiles.js index 13928a5b8..744937ef0 100644 --- a/js/iD/renderer/tiles.js +++ b/js/iD/renderer/tiles.js @@ -49,13 +49,15 @@ iD.Tiles = function(selection, projection) { .attr('class', 'tile') .attr('xlink:href', tileUrl); - tiles.attr({ width: Math.ceil(ts), height: Math.ceil(ts) }) - .attr('transform', function(d) { + tiles.attr({ + width: Math.ceil(ts), + height: Math.ceil(ts), + transform: function(d) { return 'translate(' + Math.round((d[1] * ts) - tile_origin[0]) + ',' + - Math.round((d[2] * ts) - tile_origin[1]) + - ')'; - }); + Math.round((d[2] * ts) - tile_origin[1]) + ')'; + } + }); } function setSize(x) {