vue3-scroll-shadow-fixes (#260)
This commit is contained in:
parent
f970557b76
commit
71121361f2
|
@ -59,9 +59,9 @@ export default {
|
||||||
window.addEventListener('resize', this.calcDimensions)
|
window.addEventListener('resize', this.calcDimensions)
|
||||||
|
|
||||||
// Check if shadows are necessary after the element is resized.
|
// Check if shadows are necessary after the element is resized.
|
||||||
const scrollContainerObserver = newResizeObserver(this.toggleShadow)
|
this.scrollContainerObserver = newResizeObserver(this.toggleShadow)
|
||||||
if (scrollContainerObserver) {
|
if (this.scrollContainerObserver) {
|
||||||
scrollContainerObserver.observe(this.$refs.scrollContainer)
|
this.scrollContainerObserver.observe(this.$refs.scrollContainer)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recalculate the container dimensions when the wrapper is resized.
|
// Recalculate the container dimensions when the wrapper is resized.
|
||||||
|
|
Loading…
Reference in New Issue