Close GPU preview on exit

This commit is contained in:
Joel Collins 2019-05-10 09:12:45 +01:00
parent a78a73678b
commit ab72165db7

View file

@ -63,6 +63,8 @@ export default {
window.addEventListener('resize', this.handleResize)
this.handleResize();
window.addEventListener('beforeunload', this.handleExit)
},
beforeDestroy: function () {
@ -73,6 +75,11 @@ export default {
handleResize: function(event) {
this.window.width = window.innerWidth;
this.window.height = window.innerHeight;
},
handleExit: function(event) {
console.log("Triggered beforeunload")
this.$root.$emit('globalTogglePreview', false)
}
}