From 8a384a96660bbc9d20eb8e5c28d0281091d30efb Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Mon, 18 Sep 2017 22:03:01 -0400 Subject: [PATCH] Zoom to Edit notice should be based only on zoom, not on editable --- modules/ui/notice.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ui/notice.js b/modules/ui/notice.js index 175e22f7f..9f125d2fb 100644 --- a/modules/ui/notice.js +++ b/modules/ui/notice.js @@ -13,7 +13,9 @@ export function uiNotice(context) { var button = div .append('button') .attr('class', 'zoom-to notice fillD') - .on('click', function() { context.map().zoom(context.minEditableZoom()); }); + .on('click', function() { + context.map().zoom(context.minEditableZoom()); + }); button .call(svgIcon('#icon-plus', 'pre-text')) @@ -23,7 +25,8 @@ export function uiNotice(context) { function disableTooHigh() { - div.style('display', context.editable() ? 'none' : 'block'); + var canEdit = context.map().zoom() >= context.minEditableZoom(); + div.style('display', canEdit ? 'none' : 'block'); } context.map()