]> git.openstreetmap.org Git - rails.git/commitdiff
Decrease new note marker opacity when zoomed out
authorAnton Khorev <tony29@yandex.ru>
Wed, 25 Dec 2024 22:11:39 +0000 (01:11 +0300)
committerAnton Khorev <tony29@yandex.ru>
Tue, 31 Dec 2024 23:34:22 +0000 (02:34 +0300)
app/assets/javascripts/index/new_note.js

index 73d6198ba8f7832dbaf66ef7e7747227d33f008e..76d134ce6bd4de0d6282bb25d148451f8c6e96d7 100644 (file)
@@ -113,6 +113,7 @@ OSM.NewNote = function (map) {
 
     content.find("#new-note-zoom-warning").prop("hidden", !zoomedOut);
     content.find("input[type=submit]").prop("disabled", zoomedOut || withoutText);
+    if (newNoteMarker) newNoteMarker.setOpacity(zoomedOut ? 0.5 : 0.9);
   }
 
   page.pushstate = page.popstate = function (path) {