Skip to content
Snippets Groups Projects
Commit 46b88f56 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

url is updated at most 4 times per second

parent 7bb6194f
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!553Resolve "allow to open multiple data overlays using url GET param"
......@@ -110,6 +110,15 @@ GuiConnector.prototype.init = function () {
};
var lastUrlUpdate = 0;
function updateUrl(url) {
if (lastUrlUpdate + 250 < new Date().getTime()) {
lastUrlUpdate = new Date().getTime();
window.history.replaceState(null, null, url);
}
}
/**
*
* @param {string} key
......@@ -131,7 +140,7 @@ GuiConnector.prototype.setUrlParam = function (key, value) {
}
}
}
window.history.replaceState(null, null, url);
updateUrl(url);
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment