From 526ff061727cd1142350b08eae031294908d0b27 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 7 Nov 2014 15:58:05 +0000 Subject: [PATCH] Allow query mode to be turned off at low zoom Fixes #830 --- app/assets/javascripts/index/query.js | 4 +--- app/assets/stylesheets/common.css.scss | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 12bb49efc..99bb9d9c8 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -19,11 +19,9 @@ OSM.Query = function(map) { e.preventDefault(); e.stopPropagation(); - if (queryButton.hasClass("disabled")) return; - if (queryButton.hasClass("active")) { disableQueryMode(); - } else { + } else if (!queryButton.hasClass("disabled")) { enableQueryMode(); } }).on("disabled", function (e) { diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 35ec432b5..08f1a76f9 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -566,16 +566,16 @@ nav.secondary { background-color: black; } - &.active { - background-color: #9ed485; - } - &.disabled { background-color: #333; background-color: rgba(0,0,0,.5); cursor: default; } + &.active { + background-color: #9ed485; + } + .icon { margin: 10px; } -- 2.43.2