X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6618cb9019687c8c2edf74698f84b385c0d9edd6..2fa422578448314fb6fad888b5c47cf994cb0b8c:/app/assets/javascripts/index/notes.js.erb?ds=sidebyside diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 93b60c3e7..8972d6bf9 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -190,7 +190,7 @@ function initializeNotes(map, params) { notes[feature.properties.id] = updateMarker(marker, feature); newNote = null; - addNoteButton.removeClass("disabled").addClass("geolink"); + addNoteButton.removeClass("active").addClass("geolink"); } } @@ -224,8 +224,9 @@ function initializeNotes(map, params) { e.stopPropagation(); if (addNoteButton.hasClass("disabled")) return; + if (addNoteButton.hasClass("active")) return; - addNoteButton.removeClass("geolink").addClass("disabled"); + addNoteButton.removeClass("geolink").addClass("active"); map.addLayer(noteLayer); @@ -262,7 +263,7 @@ function initializeNotes(map, params) { newNote.addTo(noteLayer).bindPopup(popupContent[0], popupOptions()).openPopup(); newNote.on("remove", function (e) { - addNoteButton.removeClass("disabled").addClass("geolink"); + addNoteButton.removeClass("active").addClass("geolink"); }).on("dragstart", function (e) { $(newNote).stopTime("removenote"); }).on("dragend", function (e) {