mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-03 18:03:38 +00:00
Avoid unnecessary style recalculation
This commit is contained in:
@@ -152,8 +152,12 @@ iD.Map = function(context) {
|
||||
if (resetTransform())
|
||||
difference = undefined;
|
||||
|
||||
surface.attr('data-zoom', ~~map.zoom());
|
||||
tilegroup.call(background);
|
||||
var zoom = String(~~map.zoom());
|
||||
if (surface.attr('data-zoom') !== zoom)
|
||||
surface.attr('data-zoom', zoom);
|
||||
|
||||
if (!difference)
|
||||
tilegroup.call(background);
|
||||
|
||||
if (map.editable()) {
|
||||
context.connection().loadTiles(projection, dimensions);
|
||||
|
||||
Reference in New Issue
Block a user