Allow query mode to be turned off at low zoom
authorTom Hughes <tom@compton.nu>
Fri, 7 Nov 2014 15:58:05 +0000 (15:58 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 7 Nov 2014 15:58:05 +0000 (15:58 +0000)
Fixes #830

app/assets/javascripts/index/query.js
app/assets/stylesheets/common.css.scss

index 12bb49efc97a4964ed45067918eeb42a75187228..99bb9d9c8abcf368875256a37b8f089395494060 100644 (file)
@@ -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) {
index 35ec432b5306e311ddc4663264132c9852248b43..08f1a76f9a2a81fa9cc8e469aed295c876c0a853 100644 (file)
@@ -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;
   }