[demo,bugfix][xs]: fix losing routing hash which mean we could not share urls (result of 5660c8802089193f6656ffc6552e05491c9e320a).
This commit is contained in:
parent
93d4b84080
commit
27b4b54098
@ -29,8 +29,10 @@ $(function() {
|
||||
// again and again
|
||||
function createExplorer(dataset) {
|
||||
// remove existing data explorer view
|
||||
var reload = false;
|
||||
if (window.dataExplorer) {
|
||||
window.dataExplorer.remove();
|
||||
reload = true;
|
||||
}
|
||||
window.dataExplorer = null;
|
||||
var $el = $('<div />');
|
||||
@ -43,8 +45,10 @@ function createExplorer(dataset) {
|
||||
});
|
||||
// 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
|
||||
window.dataExplorer.router.navigate('graph');
|
||||
window.dataExplorer.router.navigate('', true);
|
||||
if (reload) {
|
||||
window.dataExplorer.router.navigate('graph');
|
||||
window.dataExplorer.router.navigate('', true);
|
||||
}
|
||||
}
|
||||
|
||||
// convenience function
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user