francoischalifour / medium-zoom

🔎🖼 A JavaScript library for zooming images like Medium
https://medium-zoom.francoischalifour.com
MIT License
3.58k stars 161 forks source link

Unable to use in a slider with custom zoom button #149

Closed heybourn closed 4 years ago

heybourn commented 4 years ago

Bug description

I'm using Vue, Vue Awesome Swiper and Medium Zoom. I've also created a custom zoom button which sits somewhere on my page.

Clicking my zoom button will only open the first slide in the carousel, even after swiping. I've tried to use active slide selectors, destroy methods and adding the zoom on slide change - however I've had no luck.

How to reproduce

A list of the steps to reproduce the bug.

  1. Create a Vue project with Vue Awesome Swiper and Medium Zoom
  2. Add a custom zoom button (as explained in the docs)
  3. See error

Expected behavior

What I would like is for the zoom element to change based on the visible Swiper card.

Environment

francoischalifour commented 4 years ago

Thanks for opening the issue.

Could you please provide a reproducible example in this Vue + Medium Zoom sandbox? It'll be easier to understand what you've tried and how to find a solution.