]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/notes.js.erb
Make "add note" cope with base layer changes
[rails.git] / app / assets / javascripts / index / notes.js.erb
index 0728907758dab6e88007e03367b4bf87ca123243..f212c85b7562b2c6f5d9f9297d7cd1f97502bf10 100644 (file)
@@ -171,6 +171,9 @@ $(document).ready(function () {
   function createNote(marker, form, url) {
     var location = marker.getLatLng();
 
+    marker.options.draggable = false;
+    marker.dragging.disable();
+
     $(form).find("input[type=submit]").prop("disabled", true);
 
     $.ajax({
@@ -216,7 +219,7 @@ $(document).ready(function () {
     });
   }
 
-  $("#createnoteanchor").click(function (e) {
+  $(".leaflet-control-attribution").on("click", "#createnoteanchor", function (e) {
     e.preventDefault();
 
     if ($(e.target).hasClass("disabled")) return;