Remove active class from addNoteButton only in page.unload()

Same reasons as in the previous commit.
This commit is contained in:
Anton Khorev 2024-12-25 05:08:44 +03:00
parent 5542858315
commit 17ab002c04

View file

@ -96,9 +96,7 @@ OSM.NewNote = function (map) {
newNoteMarker.addTo(map);
addHalo(newNoteMarker.getLatLng());
newNoteMarker.on("remove", function () {
addNoteButton.removeClass("active");
}).on("dragend", function () {
newNoteMarker.on("dragend", function () {
content.find("textarea").focus();
});
}
@ -158,7 +156,6 @@ OSM.NewNote = function (map) {
createNote(location, text, (feature) => {
content.find("textarea").val("");
addCreatedNoteMarker(feature);
addNoteButton.removeClass("active");
OSM.router.route("/note/" + feature.properties.id);
});
});