Move setting init page to method

This commit is contained in:
Vadim
2021-10-10 12:28:44 +03:00
parent de213cba88
commit 6c8e16492b
2 changed files with 18 additions and 29 deletions

View File

@@ -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);
}
})()