Skip to content

Commit fe6ea21

Browse files
committed
Fix: carousel not resizing
1 parent 122ab80 commit fe6ea21

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/pages/PageProject.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
var timer = setTimeout(() => {
5353
Store.flickityGallery.resize()
5454
clearTimeout(timer)
55-
}, 500)
55+
}, 1500)
5656
}
5757
}
5858
</script>

src/store/Methods.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,16 @@ export default {
227227
oldCarousel.parentNode.removeChild(oldCarousel)
228228
}
229229
function initSlider () {
230-
Store.flickityGallery = new Flickity(carousel, {
231-
wrapAround: true,
232-
pageDots: false,
233-
draggable: false,
234-
adaptiveHeight: true,
235-
imagesLoaded: true
236-
})
230+
var timer = setTimeout(() => {
231+
Store.flickityGallery = new Flickity(carousel, {
232+
wrapAround: true,
233+
pageDots: false,
234+
draggable: false,
235+
adaptiveHeight: true,
236+
imagesLoaded: true
237+
})
238+
clearTimeout(timer)
239+
}, 1000)
237240
}
238241
function engage () {
239242
getItems()

0 commit comments

Comments
 (0)