From: Aaron Lidman Date: Wed, 13 Nov 2013 21:32:24 +0000 (-0800) Subject: Change halo color for notes X-Git-Tag: live~4656^2~81 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/e336fc31c71c694397603aa05a9e48c99bc8fb5d Change halo color for notes --- diff --git a/app/assets/javascripts/index/new_note.js.erb b/app/assets/javascripts/index/new_note.js.erb index 7ac37ab72..4c728d2f5 100644 --- a/app/assets/javascripts/index/new_note.js.erb +++ b/app/assets/javascripts/index/new_note.js.erb @@ -3,7 +3,8 @@ OSM.NewNote = function(map) { content = $('#sidebar_content'), page = {}, addNoteButton = $(".control-note .control-button"), - newNote; + newNote, + halo; var noteIcons = { "new": L.icon({ @@ -106,6 +107,15 @@ OSM.NewNote = function(map) { newNote.addTo(noteLayer); + halo = L.circleMarker(map.containerPointToLatLng(markerPosition), { + weight: 2.5, + radius: 20, + fillOpacity: 0.5, + color: "#FF6200" + }); + + map.addLayer(halo); + newNote.on("remove", function () { addNoteButton.removeClass("active"); }).on("dragstart",function () { @@ -130,6 +140,7 @@ OSM.NewNote = function(map) { page.unload = function () { noteLayer.removeLayer(newNote); + map.removeLayer(halo); addNoteButton.removeClass("active"); }; diff --git a/app/assets/javascripts/index/note.js.erb b/app/assets/javascripts/index/note.js.erb index 6458626f4..b9730bf1d 100644 --- a/app/assets/javascripts/index/note.js.erb +++ b/app/assets/javascripts/index/note.js.erb @@ -78,7 +78,9 @@ OSM.Note = function (map) { if (!map.hasLayer(halo)) { halo = L.circleMarker(data.coordinates.split(','), { weight: 2.5, - radius: 20 + radius: 20, + fillOpacity: 0.5, + color: "#FF6200" }); map.addLayer(halo); }