X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/5e420d9e50af1caca380c2ad22932f9d5ca26821..890153b2a6412a60f352f88fc3d8c80be14451fc:/app/assets/javascripts/index/notes.js.erb diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 7e197b09e..7336c49ec 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -7,18 +7,18 @@ $(document).ready(function () { var noteIcons = { "new": L.icon({ iconUrl: "<%= image_path 'new_note_marker.png' %>", - iconSize: [22, 22], - iconAnchor: [11, 11] + iconSize: [25, 40], + iconAnchor: [12, 40] }), "open": L.icon({ iconUrl: "<%= image_path 'open_note_marker.png' %>", - iconSize: [22, 22], - iconAnchor: [11, 11] + iconSize: [25, 40], + iconAnchor: [12, 40] }), "closed": L.icon({ iconUrl: "<%= image_path 'closed_note_marker.png' %>", - iconSize: [22, 22], - iconAnchor: [11, 11] + iconSize: [25, 40], + iconAnchor: [12, 40] }) }; @@ -96,7 +96,7 @@ $(document).ready(function () { { marker = L.marker(feature.geometry.coordinates.reverse(), { icon: noteIcons[feature.properties.status], - opacity: 0.7 + opacity: 0.9 }); marker.addTo(noteLayer).bindPopup( @@ -151,7 +151,7 @@ $(document).ready(function () { minWidth: 320, maxWidth: mapSize.y * 1 / 3, maxHeight: mapSize.y * 2 / 3, - offset: new L.Point(0, -3), + offset: new L.Point(0, -40), autoPanPadding: new L.Point(60, 40) }; } @@ -202,6 +202,8 @@ $(document).ready(function () { text: $(form.text).val() }, success: function (feature) { + $(marker._popup._content).find("textarea").val(""); + notes[feature.properties.id] = updateMarker(marker, feature); newNote = null; @@ -262,7 +264,7 @@ $(document).ready(function () { newNote = L.marker(map.containerPointToLatLng(markerPosition), { icon: noteIcons["new"], - opacity: 0.7, + opacity: 0.9, draggable: true });