Fix loading cloned images
This commit is contained in:
@@ -116,6 +116,9 @@
|
|||||||
currentPageIndex = value.currentPageIndex
|
currentPageIndex = value.currentPageIndex
|
||||||
})
|
})
|
||||||
if (pagesElement && pageWindowElement) {
|
if (pagesElement && pageWindowElement) {
|
||||||
|
// load first and last child to clone them
|
||||||
|
loaded = [0, pagesElement.children.length - 1]
|
||||||
|
await tick()
|
||||||
infinite && addClones()
|
infinite && addClones()
|
||||||
applyPageSizes()
|
applyPageSizes()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export let src
|
export let src
|
||||||
export let alt
|
export let alt
|
||||||
export let loaded
|
export let loaded = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="image-container">
|
<div class="image-container">
|
||||||
|
|||||||
Reference in New Issue
Block a user