Do not redraw tiles when in only mode

This commit is contained in:
Tom MacWright
2012-11-20 17:24:19 -05:00
parent 561bef13f1
commit 4371dc4ace
2 changed files with 11 additions and 7 deletions
+4 -2
View File
@@ -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);
+7 -5
View File
@@ -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) {