Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong location of image if container has "transform" style #3

Open
ebk46 opened this issue Aug 12, 2019 · 1 comment
Open

Wrong location of image if container has "transform" style #3

ebk46 opened this issue Aug 12, 2019 · 1 comment

Comments

@ebk46
Copy link

ebk46 commented Aug 12, 2019

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 ebk46 changed the title Wrong location of image container has "transform" property Wrong location of image if container has "transform" property Aug 12, 2019
@ebk46 ebk46 changed the title Wrong location of image if container has "transform" property Wrong location of image if container has "transform" style Aug 12, 2019
@bmcmahen
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants