Move new note page.pushstate/popstate next to page.load

This commit is contained in:
Anton Khorev 2024-12-25 04:19:19 +03:00
parent dc59b37fe1
commit f1835c914c

View file

@ -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;