]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/new_note.js
Merge pull request #1558 from plarus/master
[rails.git] / app / assets / javascripts / index / new_note.js
index 3111a579fa465c5f08c24d41a8cbb3e5784853cd..b1c07bbbf85ec0ba85689195739a3d230a8333d3 100644 (file)
@@ -1,10 +1,12 @@
-OSM.NewNote = function(map) {
+//= require qs/dist/qs
+
+OSM.NewNote = function (map) {
   var noteLayer = map.noteLayer,
-    content = $("#sidebar_content"),
-    page = {},
-    addNoteButton = $(".control-note .control-button"),
-    newNote,
-    halo;
+      content = $("#sidebar_content"),
+      page = {},
+      addNoteButton = $(".control-note .control-button"),
+      newNote,
+      halo;
 
   var noteIcons = {
     "new": L.icon({
@@ -107,7 +109,7 @@ OSM.NewNote = function(map) {
 
     map.addLayer(noteLayer);
 
-    var params = querystring.parse(path.substring(path.indexOf("?") + 1));
+    var params = Qs.parse(path.substring(path.indexOf("?") + 1));
     var markerLatlng;
 
     if (params.lat && params.lon) {
@@ -126,7 +128,7 @@ OSM.NewNote = function(map) {
       draggable: true
     });
 
-    newNote.on("dragstart dragend", function(a) {
+    newNote.on("dragstart dragend", function (a) {
       newHalo(newNote.getLatLng(), a.type);
     });
 
@@ -135,7 +137,7 @@ OSM.NewNote = function(map) {
 
     newNote.on("remove", function () {
       addNoteButton.removeClass("active");
-    }).on("dragstart",function () {
+    }).on("dragstart", function () {
       $(newNote).stopTime("removenote");
     }).on("dragend", function () {
       content.find("textarea").focus();