Mario-Duarte / react-image-zooom

Simple React component that will allow users to zoom in on your images, perfect for product images and galleries!
https://mario-duarte.github.io/react-image-zooom/
26 stars 6 forks source link

Zoom failure to reset when swapping image source #13

Closed Vardidis closed 3 months ago

Vardidis commented 3 months ago

It looks like when swapping the image source it takes a second to zoom out to default zoom.

This is my code: <ImageZoom className="product-main-img" src={bigImage} alt="" zoom="300"/>

I change the source of the big image using useState when hovering over a small image. I tried changing values for zoom but the issue remained.

https://github.com/Mario-Duarte/react-image-zooom/assets/44882528/306e0e05-28da-4991-9e60-336c1456d1bb

Mario-Duarte commented 3 months ago

Should release a fix for this soon

Mario-Duarte commented 3 months ago

A fix is already done, I will be doing some tests, then push the changes and update the demo page.

Thanks for pointing this out to me,

https://github.com/Mario-Duarte/react-image-zooom/assets/8998720/2196b4a4-9821-41c7-aa31-681a5c020855

Mario-Duarte commented 3 months ago

This has now been released

Vardidis commented 3 months ago

Working just fine now, thanks for the instant fix brother.