Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel not displaying properly #44

Open
sharjeel619 opened this issue Nov 5, 2018 · 4 comments
Open

Carousel not displaying properly #44

sharjeel619 opened this issue Nov 5, 2018 · 4 comments

Comments

@sharjeel619
Copy link

Slide Images are appearing on top of each other when used with Vue.js

@mortensassi
Copy link

mortensassi commented Nov 8, 2018

having the same problem, i guess it has to do with flickity firing up before images are fully loaded

EDIT: Check this closed issue: #8 (comment)

@sharjeel619
Copy link
Author

@mortensassi Did it work for you ?

@mortensassi
Copy link

@sharjeel619 yeah it did - i implemented it like mentioned in the comment:

<flickity class="slider slider--galery" :class="{'slider--galery-visible' : showGalery}" ref="flickity" v-images-loaded="imgsLoaded" :options="flickityOptions">
      <img v-for="image in galery" :key="image.ID" class="slider__image" :src="image.url" alt="">
</flickity>
methods: {
    imgsLoaded () {
      let flickityInstance = this.$refs.flickity
      flickityInstance.reloadCells()
    },

    show () {
      const viewer = this.$el.querySelector('.galery-images').$viewer
      viewer.show()
    }
  },

@sharjeel619
Copy link
Author

@mortensassi Thanks Man, That really did it for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants