From a5ca0f48c1fd2d5693ce8c3435de97facb130cf5 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 5 Feb 2013 19:03:13 +0000 Subject: [PATCH] Stop newly added notes disappearing --- app/assets/javascripts/index/notes.js.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 4594f1c78..bff4c446c 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -44,6 +44,7 @@ $(document).ready(function () { if (newNote && e.popup == newNote._popup) { $(newNote).oneTime(10, "removenote", function () { map.removeLayer(newNote); + newNote = null; }); } }); @@ -176,8 +177,8 @@ $(document).ready(function () { }, success: function (feature) { notes[feature.properties.id] = updateMarker(marker, feature); + newNote = null; - $(".leaflet-popup-close-button").off("click.close"); $("#createnoteanchor").removeClass("disabled").addClass("geolink"); } }); -- 2.39.5