Move setting init page to method
This commit is contained in:
@@ -78,10 +78,6 @@
|
||||
* Page to start on
|
||||
*/
|
||||
export let initialPageIndex = 0
|
||||
$: {
|
||||
console.log('initialPageIndex', initialPageIndex)
|
||||
data.initialPageIndex = initialPageIndex
|
||||
}
|
||||
|
||||
/**
|
||||
* Transition duration (ms)
|
||||
@@ -219,6 +215,8 @@
|
||||
// call after adding clones
|
||||
data.particlesCount = particlesContainer.children.length
|
||||
|
||||
methods.showPage(initialPageIndex, { animated: false })
|
||||
|
||||
pageWindowElementResizeObserver.observe(pageWindowElement);
|
||||
}
|
||||
})()
|
||||
|
||||
Reference in New Issue
Block a user