From e60c9ab16b1d6c7b4e7268a6e2e6ce8f5b4ac4d2 Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Wed, 13 Feb 2013 17:31:23 -0500 Subject: [PATCH] Fix zoom limitation while drawing --- js/id/renderer/map.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 03562d3d8..900609af4 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -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(),