Merge branch 'release' into develop

This commit is contained in:
SabreCat
2018-02-01 21:09:57 +00:00
11 changed files with 39 additions and 21 deletions

View File

@@ -48,8 +48,8 @@ export default {
this.$root.$emit('bv::show::modal', 'broken-task-modal');
});
},
removed () {
this.$root.$remove('handle-broken-task');
beforeDestroy () {
this.$root.$off('handle-broken-task');
},
methods: {
...mapActions({

View File

@@ -192,10 +192,7 @@ export default {
this.castEnd(target, type, $event);
});
document.addEventListener('keyup', keyEvent => {
if (keyEvent.keyCode !== 27) return;
this.castCancel();
});
document.addEventListener('keyup', this.handleKeyUp);
// @TODO: should we abstract the drawer state/local store to a library and mixing combo? We use a similar pattern in equipment
const spellDrawerState = getLocalSetting(CONSTANTS.keyConstants.SPELL_DRAWER_STATE);
@@ -203,6 +200,10 @@ export default {
this.$store.state.spellOptions.spellDrawOpen = false;
}
},
beforeDestroy () {
this.$root.$off('castEnd');
document.removeEventListener('keyup', this.handleKeyUp);
},
computed: {
...mapState({user: 'user.data'}),
openStatus () {
@@ -210,6 +211,10 @@ export default {
},
},
methods: {
handleKeyUp (keyEvent) {
if (keyEvent.keyCode !== 27) return;
this.castCancel();
},
drawerToggled (newState) {
this.$store.state.spellOptions.spellDrawOpen = newState;