Close GPU preview on exit
This commit is contained in:
parent
a78a73678b
commit
ab72165db7
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue