Permalink
Browse files

Stop newly added notes disappearing

  • Loading branch information...
1 parent 9f02513 commit a5ca0f48c1fd2d5693ce8c3435de97facb130cf5 @tomhughes committed Feb 5, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 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");
}
});

0 comments on commit a5ca0f4

Please sign in to comment.