Skip to content

Commit

Permalink
Save the panel cid when navigating (#62, #106)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Aug 18, 2020
1 parent 8dd593a commit 2332bfa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/aspects/exploration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ import router from '../global/exploration-router';
import explorer from '../global/explorer-view';
import '../global/explorer-controller';

channel.on('currentRoute', route => router.navigate(route));
const browserHistory = window.history;

channel.on('currentRoute', (route, panel) => {
router.navigate(route);
// Amend the state that Backbone.history just pushed with the cid of the
// panel.
browserHistory.replaceState(panel.cid, document.title);
});

0 comments on commit 2332bfa

Please sign in to comment.