Eliminate floating point error in zoomIn/zoomOut

(closes #2394)
This commit is contained in:
Bryan Housel
2014-10-13 22:49:50 -04:00
parent 241400faf9
commit 8f5f63d5e9
+2 -2
View File
@@ -297,8 +297,8 @@ iD.Map = function(context) {
return redraw();
};
map.zoomIn = function() { return map.zoom(Math.ceil(map.zoom() + 1)); };
map.zoomOut = function() { return map.zoom(Math.floor(map.zoom() - 1)); };
map.zoomIn = function() { return map.zoom(~~map.zoom() + 1); };
map.zoomOut = function() { return map.zoom(~~map.zoom() - 1); };
map.center = function(loc) {
if (!arguments.length) {