]> git.openstreetmap.org Git - rails.git/commitdiff
Disable dragging of new notes once they are submitted
authorTom Hughes <tom@compton.nu>
Mon, 29 Apr 2013 16:20:21 +0000 (17:20 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 29 Apr 2013 16:20:21 +0000 (17:20 +0100)
app/assets/javascripts/index/notes.js.erb

index 0728907758dab6e88007e03367b4bf87ca123243..4d796a3de8cc7b36ee5b5a6c0034d9dfa75bbb41 100644 (file)
@@ -171,6 +171,9 @@ $(document).ready(function () {
   function createNote(marker, form, url) {
     var location = marker.getLatLng();
 
   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({
     $(form).find("input[type=submit]").prop("disabled", true);
 
     $.ajax({