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], translateY: [24, 0],
duration: animDuration, duration: animDuration,
delay: 650, delay: 650,
easing: 'easeOutQuart' easing: 'easeOutQuart',
complete: () => el.removeAttribute('style')
}) })
} }
}) })

View File

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