X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e256c837b56d9f1c40c0c57dd89db4825bc7489e..ffeddd62a8c090c43074596f3095e21e5b7f3e5e:/app/assets/javascripts/index/new_note.js diff --git a/app/assets/javascripts/index/new_note.js b/app/assets/javascripts/index/new_note.js index 4fe3fcaeb..397daa637 100644 --- a/app/assets/javascripts/index/new_note.js +++ b/app/assets/javascripts/index/new_note.js @@ -81,7 +81,7 @@ OSM.NewNote = function(map) { }; function newHalo(loc, a) { - if (a == 'dragstart' && map.hasLayer(halo)) { + if (a === 'dragstart' && map.hasLayer(halo)) { map.removeLayer(halo); } else { if (map.hasLayer(halo)) map.removeLayer(halo); @@ -108,13 +108,7 @@ OSM.NewNote = function(map) { var mapSize = map.getSize(); var markerPosition; - if (mapSize.y > 800) { - markerPosition = [mapSize.x / 2, mapSize.y / 2]; - } else if (mapSize.y > 400) { - markerPosition = [mapSize.x / 2, 400]; - } else { - markerPosition = [mapSize.x / 2, mapSize.y]; - } + markerPosition = [mapSize.x / 2, mapSize.y / 2]; newNote = L.marker(map.containerPointToLatLng(markerPosition), { icon: noteIcons["new"],