AdamRisberg / react-image-magnifiers

A collection of responsive, image magnifying React components for mouse and touch.
MIT License
347 stars 60 forks source link

Images with transparency are visually overlaping #22

Closed rafw87 closed 4 years ago

rafw87 commented 4 years ago

When Magnifier image has transparent background (for example SVG) then both images are visible and overlapped when zoomed. Hiding "main image" in MagnifierRenderer.js seems to be enough to fix this problem:

visibility: isActive ? "hidden" : "visible"
AdamRisberg commented 4 years ago

I'll add this in to the next update, after looking into your other issue.

AdamRisberg commented 4 years ago

I just posted version 1.3.2 with this fix.