]> git.openstreetmap.org Git - rails.git/commitdiff
Change halo color for notes
authorAaron Lidman <aaronlidman@gmail.com>
Wed, 13 Nov 2013 21:32:24 +0000 (13:32 -0800)
committerAaron Lidman <aaronlidman@gmail.com>
Wed, 13 Nov 2013 21:32:24 +0000 (13:32 -0800)
app/assets/javascripts/index/new_note.js.erb
app/assets/javascripts/index/note.js.erb

index 7ac37ab728c34aa409ca056b2580ad612baa8301..4c728d2f5e3b748160d258aaf3fe6441ee03d60a 100644 (file)
@@ -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");
   };
 
index 6458626f41abb25eca8cdada6b847251878c22c1..b9730bf1da08b5e1147d19186353ffe1cb2d11f9 100644 (file)
@@ -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);
     }