]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.key.js
Add/remove active class on map UI buttons
[rails.git] / app / assets / javascripts / leaflet.key.js
index c5124e39d6cf139e4e5b1115e2c691fed532303d..1c219d9538ff93234bf17abe88ceb3420876a64f 100644 (file)
@@ -5,7 +5,7 @@ L.OSM.key = function (options) {
     var $container = $('<div>')
       .attr('class', 'control-key');
 
-    $('<a>')
+    var button = $('<a>')
       .attr('class', 'control-button')
       .attr('href', '#')
       .attr('title', I18n.t('javascripts.key.tooltip'))
@@ -51,7 +51,7 @@ L.OSM.key = function (options) {
     function toggle(e) {
       e.stopPropagation();
       e.preventDefault();
-      options.sidebar.togglePane($ui);
+      options.sidebar.togglePane($ui, button);
     }
 
     function update() {