This commit is contained in:
@@ -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
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -22,20 +22,22 @@
|
|||||||
*/
|
*/
|
||||||
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) {
|
||||||
if (!firstLoad && process.browser) {
|
animateIn(scope)
|
||||||
animateIn(scope)
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Figure out how to delay the page rendering a little bit before the end of the transition panel ending
|
|
||||||
|
|
||||||
// Set pageReady to false (?)
|
|
||||||
pageReady.set(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Figure out how to delay the page rendering a little bit before the end of the transition panel ending
|
||||||
|
|
||||||
|
// Set pageReady to false (?)
|
||||||
|
pageReady.set(false)
|
||||||
|
|
||||||
|
// Store current page
|
||||||
|
previousPage = page
|
||||||
})
|
})
|
||||||
|
|
||||||
// 2. Watch when loaded changes
|
// 2. Watch when loaded changes
|
||||||
|
|||||||
Reference in New Issue
Block a user