mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-02 05:01:38 +02:00
Fix zoom limitation while drawing
This commit is contained in:
@@ -112,7 +112,7 @@ iD.Map = function(context) {
|
||||
iD.ui.flash(context.container())
|
||||
.select('.content')
|
||||
.text('Cannot zoom out further in current mode.');
|
||||
return map.zoom(16);
|
||||
return setZoom(16, true);
|
||||
}
|
||||
|
||||
projection
|
||||
@@ -214,8 +214,8 @@ iD.Map = function(context) {
|
||||
return map;
|
||||
};
|
||||
|
||||
function setZoom(z) {
|
||||
if (z === map.zoom())
|
||||
function setZoom(z, force) {
|
||||
if (z === map.zoom() && !force)
|
||||
return false;
|
||||
var scale = 256 * Math.pow(2, z),
|
||||
center = pxCenter(),
|
||||
|
||||
Reference in New Issue
Block a user