mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 22:52:32 -05:00
fix canvas intersection observer
This commit is contained in:
1 parent
49f1637c47
commit
c987ec172a
2 files changed
+10
-2
No files matched your search
@@ -196,9 +196,13 @@ export default {
|
||||
if (entry.isIntersecting) {
|
||||
this.$refs.canvas.width = this.$refs.canvas.parentNode.clientWidth
|
||||
this.$refs.canvas.height = this.$refs.canvas.parentNode.clientWidth / 3
|
||||
|
||||
this.intersectionObserver?.disconnect()
|
||||
}
|
||||
})
|
||||
}).observe(this.$refs.canvas)
|
||||
})
|
||||
|
||||
this.intersectionObserver.observe(this.$refs.canvas)
|
||||
}
|
||||
},
|
||||
beforeUnmount () {
|
||||
|
||||
@@ -221,9 +221,13 @@ export default {
|
||||
if (entry.isIntersecting) {
|
||||
this.$refs.canvas.width = this.$refs.canvas.parentNode.clientWidth
|
||||
this.$refs.canvas.height = this.$refs.canvas.parentNode.clientWidth / 3
|
||||
|
||||
this.intersectionObserver?.disconnect()
|
||||
}
|
||||
})
|
||||
}).observe(this.$refs.canvas)
|
||||
})
|
||||
|
||||
this.intersectionObserver.observe(this.$refs.canvas)
|
||||
}
|
||||
},
|
||||
beforeUnmount () {
|
||||
|
||||
Reference in new issue
Block a user