]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.key.js
zoomPrecision doesn't need to be higher-order
[rails.git] / app / assets / javascripts / leaflet.key.js
index cf54b2ded5aa7e361a405375765b2ac2102f3df7..c5124e39d6cf139e4e5b1115e2c691fed532303d 100644 (file)
@@ -14,15 +14,23 @@ L.OSM.key = function (options) {
       .appendTo($container);
 
     var $ui = $('<div>')
-      .attr('class', 'layers-ui');
+      .attr('class', 'key-ui');
 
-    $('<section>')
+    $('<div>')
+      .attr('class', 'sidebar_heading')
       .appendTo($ui)
       .append(
-      $('<h2>')
-        .text(I18n.t('javascripts.key.title')));
+        $('<a>')
+          .text(I18n.t('javascripts.close'))
+          .attr('class', 'sidebar_close')
+          .attr('href', '#')
+          .bind('click', toggle))
+      .append(
+        $('<h4>')
+          .text(I18n.t('javascripts.key.title')));
 
-    var $section = $('<section>')
+    var $section = $('<div>')
+      .attr('class', 'section')
       .appendTo($ui);
 
     options.sidebar.addPane($ui);
@@ -47,7 +55,7 @@ L.OSM.key = function (options) {
     }
 
     function update() {
-      var layer = getMapBaseLayerId(map),
+      var layer = map.getMapBaseLayerId(),
         zoom = map.getZoom();
 
       $('.mapkey-table-entry').each(function () {