]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/new_note.js
Merge remote-tracking branch 'openstreetmap/pull/1004'
[rails.git] / app / assets / javascripts / index / new_note.js
index 4fe3fcaeb93c65aaba07edb9281850fdfe1f66ec..397daa637f4f7c2397b584a45339cda5a15d6231 100644 (file)
@@ -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"],