[demo,bugfix][xs]: fix losing routing hash which mean we could not share urls (result of 5660c88020).
This commit is contained in:
@@ -29,8 +29,10 @@ $(function() {
|
|||||||
// again and again
|
// again and again
|
||||||
function createExplorer(dataset) {
|
function createExplorer(dataset) {
|
||||||
// remove existing data explorer view
|
// remove existing data explorer view
|
||||||
|
var reload = false;
|
||||||
if (window.dataExplorer) {
|
if (window.dataExplorer) {
|
||||||
window.dataExplorer.remove();
|
window.dataExplorer.remove();
|
||||||
|
reload = true;
|
||||||
}
|
}
|
||||||
window.dataExplorer = null;
|
window.dataExplorer = null;
|
||||||
var $el = $('<div />');
|
var $el = $('<div />');
|
||||||
@@ -43,8 +45,10 @@ function createExplorer(dataset) {
|
|||||||
});
|
});
|
||||||
// HACK (a bit). Issue is that Backbone will not trigger the route
|
// HACK (a bit). Issue is that Backbone will not trigger the route
|
||||||
// if you are already at that location so we have to make sure we genuinely switch
|
// if you are already at that location so we have to make sure we genuinely switch
|
||||||
|
if (reload) {
|
||||||
window.dataExplorer.router.navigate('graph');
|
window.dataExplorer.router.navigate('graph');
|
||||||
window.dataExplorer.router.navigate('', true);
|
window.dataExplorer.router.navigate('', true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// convenience function
|
// convenience function
|
||||||
|
|||||||
Reference in New Issue
Block a user