]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/new_note.js
Stop creating a shared global querystring variable
[rails.git] / app / assets / javascripts / index / new_note.js
index 3111a579fa465c5f08c24d41a8cbb3e5784853cd..9d68ab65c8fc62b2a4eb2bb1147bb3f2742b0e31 100644 (file)
@@ -1,10 +1,14 @@
-OSM.NewNote = function(map) {
+//= require querystring
+
+OSM.NewNote = function (map) {
+  var querystring = require("querystring-component");
+
   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({
@@ -126,7 +130,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 +139,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();