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

This commit is contained in:
2020-03-22 17:34:24 +01:00
parent 3d07c3e887
commit 7280e83d18
2 changed files with 17 additions and 15 deletions

View File

@@ -77,11 +77,11 @@
// On init, send an event to the Carousel component with the photoSlug to set currentIndex and then change the photo // On init, send an event to the Carousel component with the photoSlug to set currentIndex and then change the photo
// Pop event from browser (prev/next) // Pop event from browser (prev/next)
// const changedUrl = event => { const changedUrl = event => {
// dispatch('changedUrl', { dispatch('changedUrl', {
// location: event.target.location currentPhoto: currentPhoto
// }) })
// } }
/* /*

View File

@@ -22,12 +22,12 @@
*/ */
let scope let scope
let firstLoad = true let firstLoad = true
let previousPage
// 1. Watch page change // 1. Watch page change
page.subscribe(page => { page.subscribe(page => {
if (!page.params.photo) {
// Run the loader animation (only after first load) // Run the loader animation (only after first load)
if (!firstLoad && process.browser) { if (!firstLoad) {
animateIn(scope) animateIn(scope)
} }
@@ -35,7 +35,9 @@
// Set pageReady to false (?) // Set pageReady to false (?)
pageReady.set(false) pageReady.set(false)
}
// Store current page
previousPage = page
}) })
// 2. Watch when loaded changes // 2. Watch when loaded changes