From ae5b7812ccfda66c59cb3ff57ce3b2c3e718f14b Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Wed, 25 Dec 2024 03:38:30 +0300 Subject: [PATCH] Rename updateMarker() to addCreatedNoteMarker() This function doesn't update any existing marker. --- app/assets/javascripts/index/new_note.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/index/new_note.js b/app/assets/javascripts/index/new_note.js index a3b809d0d..bd093e11a 100644 --- a/app/assets/javascripts/index/new_note.js +++ b/app/assets/javascripts/index/new_note.js @@ -49,7 +49,7 @@ OSM.NewNote = function (map) { }); } - function updateMarker(feature) { + function addCreatedNoteMarker(feature) { var marker = L.marker(feature.geometry.coordinates.reverse(), { icon: noteIcons[feature.properties.status], opacity: 0.9, @@ -144,7 +144,7 @@ OSM.NewNote = function (map) { createNote(location, text, (feature) => { content.find("textarea").val(""); - updateMarker(feature); + addCreatedNoteMarker(feature); noteLayer.removeLayer(newNoteMarker); newNoteMarker = null; addNoteButton.removeClass("active"); -- 2.39.5