Skip to content

Support for <Magnifier /> rotated by CSS #12

@MatthewRorke

Description

@MatthewRorke

It would be extremely useful if there were some sort of support for allowing CSS transforms to still maintain its usability.

If you add a rotation style to the component (via className) to apply a rotational transformation, for every 90 degree, we find that x = -y && y = x

I have added a sample to the storybook:
https://github.com/MatthewRorke/react-magnifier

Would it be possible for author to look into implementing this by translating the co-ordinates between X and Y correctly (perhaps based on a new property?) and to separate the mouseX and mouseY position in to its own part of the component state to ensure that the image and the mouse position are calculated correctly, but separately?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions