react-image-enlarger icon indicating copy to clipboard operation
react-image-enlarger copied to clipboard

Wrong location of image if container has "transform" style

Open ebk46 opened this issue 6 years ago • 1 comments

I'm using MaterialUI v4 and I'm trying to use react-image-enlarger inside of a modal. It looks like the location is incorrect as long as the modal has "transform" set.

Sandbox: https://codesandbox.io/s/react-image-enlarge-modal-bug-pviqp

In the sandbox you can comment/uncomment the transform to see how it is effecting the image placement.

ebk46 avatar Aug 12 '19 20:08 ebk46

Hmm, interesting. Good catch. I'm not sure entirely what's going on as getBoundingClientRect should take into account transforms. I'll try and debug and get a solution to this soon.

bmcmahen avatar Aug 13 '19 03:08 bmcmahen