Fullscreen fixes
All checks were successful
continuous-integration/drone/push Build is passing

- 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:
2020-03-29 18:16:05 +02:00
parent ca07fe364e
commit 18b9ece009
2 changed files with 8 additions and 5 deletions

View File

@@ -65,7 +65,8 @@ export const animateIn = () => {
translateY: [24, 0],
duration: animDuration,
delay: 650,
easing: 'easeOutQuart'
easing: 'easeOutQuart',
complete: () => el.removeAttribute('style')
})
}
})

View File

@@ -57,10 +57,12 @@
closed = true
// Clear image and reset fullscreen store value
setTimeout(() => {
scope.querySelector('.fullscreen__image').innerHTML = ''
fullscreen.set()
}, 800) // Transition duration
if (scope) {
setTimeout(() => {
scope.querySelector('.fullscreen__image').innerHTML = ''
fullscreen.set()
}, 800) // Transition duration
}
}, 800)
</script>