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

fix: hide the magnified img in zoom out mode #4

Closed Ahmed-Basalib10 closed 1 year ago

Ahmed-Basalib10 commented 1 year ago

Hi 👋 @Mario-Duarte I hope you are doing well!, I opened this PR to solve the issue with the images that don't have background.

I use this package in my project and it is really nice, but recently I realised that there is an issue with the images that don't have a background, the issue is that in zoom out mode both images the original image and the magnified image are showing at the same time and overlapping together.

Mario-Duarte commented 1 year ago

Hi @Ahmed-Basalib10 Thanks for doing this, it may be an oversight while creating this as I never intended this to be used with images that had transparency such as .png.

But I appreciate you taking the time to add this to the main package

Ahmed-Basalib10 commented 1 year ago

Could you please only create a pull request for the changes made to the src/react-image-zoom.js?

Yes sure, it is done PR updated, now all the files are same as before just src/react-image-zoom.js changed. thanks

Mario-Duarte commented 1 year ago

Could you please only create a pull request for the changes made to the src/react-image-zoom.js?

Yes sure, it is done PR updated, now all the files are same as before just src/react-image-zoom.js changed. thanks

Thats great thank you, I will merge this and get a release out