- Due to the Homepage carousel animation, fullscreen was constraint to the top of the parent block. Resetting the style on transition complete fixes it - Check if scope exists before emptying its image content
This commit is contained in:
@@ -65,7 +65,8 @@ export const animateIn = () => {
|
|||||||
translateY: [24, 0],
|
translateY: [24, 0],
|
||||||
duration: animDuration,
|
duration: animDuration,
|
||||||
delay: 650,
|
delay: 650,
|
||||||
easing: 'easeOutQuart'
|
easing: 'easeOutQuart',
|
||||||
|
complete: () => el.removeAttribute('style')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -57,10 +57,12 @@
|
|||||||
closed = true
|
closed = true
|
||||||
|
|
||||||
// Clear image and reset fullscreen store value
|
// Clear image and reset fullscreen store value
|
||||||
setTimeout(() => {
|
if (scope) {
|
||||||
scope.querySelector('.fullscreen__image').innerHTML = ''
|
setTimeout(() => {
|
||||||
fullscreen.set()
|
scope.querySelector('.fullscreen__image').innerHTML = ''
|
||||||
}, 800) // Transition duration
|
fullscreen.set()
|
||||||
|
}, 800) // Transition duration
|
||||||
|
}
|
||||||
}, 800)
|
}, 800)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user