Skip to content

Commit

Permalink
CommonLayout startup correctly emiting events
Browse files Browse the repository at this point in the history
  • Loading branch information
prawnsalad committed Feb 4, 2018
1 parent 627c084 commit 70f39fd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/startups/CommonLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ export default {
methods: {
close() {
this.closing = true;
this.$el.addEventListener('transitionend', (event) => {
let startApp = (event) => {
this.$el.removeEventListener('transitionend', startApp);
state.persistence.watchStateForChanges();
this.$emit('start');
}, false);
// Hacky to be using $parent but this component should only be used in a sepcific
// scope within startup screens
this.$parent.$emit('start');
};
this.$el.addEventListener('transitionend', startApp, false);
},
},
};
Expand Down

0 comments on commit 70f39fd

Please sign in to comment.