]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/leaflet.note.js
Auto-select share link text
[rails.git] / app / assets / javascripts / leaflet.note.js
index 68e09c88deb90a4403479d5b30660f53f04c522a..77fb9baff90f3afc6936dfdd7d4a599fda8daf30 100644 (file)
@@ -8,22 +8,10 @@ L.OSM.note = function (options) {
     $('<a>')
       .attr('class', 'control-button')
       .attr('href', '#')
-      .attr('title', 'Notes')
+      .attr('title', I18n.t('javascripts.notes.new.add'))
       .html('<span class="icon note"></span>')
-      .on('click', toggle)
       .appendTo($container);
 
-    function toggle(e) {
-      e.stopPropagation();
-      e.preventDefault();
-
-      if (map.hasLayer(map.noteLayer)) {
-        map.removeLayer(map.noteLayer);
-      } else {
-        map.addLayer(map.noteLayer);
-      }
-    }
-
     return $container[0];
   };