Got basic dialog working, no morph animation yet
This commit is contained in:
11
app/imports/ui/dialogStack/dialogStackWindowEvents.js
Normal file
11
app/imports/ui/dialogStack/dialogStackWindowEvents.js
Normal file
@@ -0,0 +1,11 @@
|
||||
import store from "/imports/ui/vuexStore.js";
|
||||
|
||||
if (window){
|
||||
window.onpopstate = function(event){
|
||||
let state = event.state;
|
||||
let numDialogs = store.state.dialogStack.dialogs.length;
|
||||
if (_.isFinite(state.openDialogs) && numDialogs > state.openDialogs){
|
||||
store.commit("popDialogStackMutation");
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user