mark-rolich / Magnifier.js

Javascript library enabling magnifying glass effect on an images
MIT License
831 stars 193 forks source link

Magnifier create/destroy #24

Open ilgala opened 8 years ago

ilgala commented 8 years ago

Hi everyone, I'm using your Magnifier.js (great work btw) for a product configurator project. The front-end part is mostly a jQuery plugin that uses Ajax to load the images from the laravel back-end. When I load a list of images, I use the "main image wrapper" as largeWrapper. You can see an example in this picture:

image1

The problem comes out when I change the tab the and I move the mouse over the last coordinates of the Magnifier where the old image is zoomed, as you can see in this other picture:

image2

How can I avoid this? And since many images may be loaded/reloaded how can I programmatically create/destroy the Magnifier?

MickL commented 7 years ago

I guess the thumbs are still visible in DOM but hidden? (e.g. when using opacity:0 or visibility:hidden for the tab instead of display:none)

squalvj commented 6 years ago

i have this issue also, how do we destroy and re init the plugin ?