Added store.state.ready listener

This commit is contained in:
Joel Collins 2019-02-26 13:48:54 +00:00
parent f8758fe2ff
commit 1ff0737b8a

View file

@ -43,7 +43,20 @@ export default {
created: function () { created: function () {
// Add resize listener // Add resize listener
window.addEventListener('resize', this.handleResize) window.addEventListener('resize', this.handleResize);
// Watch for host 'ready'
this.$store.watch(
(state)=>{
return this.$store.getters.ready
},
(newValue, oldValue)=>{
// 'ready' changed, so do something
console.log(oldValue)
console.log(newValue)
this.previewRequest(this.$store.state.settings.autoGpuPreview)
}
)
}, },
beforeDestroy: function () { beforeDestroy: function () {