Move new note page.pushstate/popstate next to page.load
This commit is contained in:
parent
dc59b37fe1
commit
f1835c914c
1 changed files with 6 additions and 6 deletions
|
@ -59,12 +59,6 @@ OSM.NewNote = function (map) {
|
|||
marker.addTo(noteLayer);
|
||||
}
|
||||
|
||||
page.pushstate = page.popstate = function (path) {
|
||||
OSM.loadSidebarContent(path, function () {
|
||||
page.load(path);
|
||||
});
|
||||
};
|
||||
|
||||
function newHalo(loc, a) {
|
||||
var hasHalo = halo && map.hasLayer(halo);
|
||||
|
||||
|
@ -84,6 +78,12 @@ OSM.NewNote = function (map) {
|
|||
}
|
||||
}
|
||||
|
||||
page.pushstate = page.popstate = function (path) {
|
||||
OSM.loadSidebarContent(path, function () {
|
||||
page.load(path);
|
||||
});
|
||||
};
|
||||
|
||||
page.load = function (path) {
|
||||
if (addNoteButton.hasClass("disabled")) return;
|
||||
if (addNoteButton.hasClass("active")) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue