Skip to content

Conversation

jeremymlane
Copy link

@jeremymlane jeremymlane commented Feb 16, 2017

I added ability to use react-resizable when the document body has been scaled using a css transform (eg. transform: scale(0.5);)

This fixes #52 and fulfills the requirements for react-grid-layout/react-grid-layout#486

…scaled using a css transform (eg. transform: scale(0.5);)
@STRML
Copy link
Collaborator

STRML commented Feb 17, 2017

This is a very specific hack that will only handle the specific case where <body> has a transform, but not any other parent element.

Therefore I cannot accept it - it is too specific. It would be better if this could handle any parent scale, or if a callback were attached to modify the width and height so that this could be implemented in the application but outside of <Resizable>.

That said, thank you very much for the contribution and I hope you have the time for a more general solution.

@jeremymlane
Copy link
Author

I had originally done this with a property. Would passing in a "scale" property be acceptable?

@STRML
Copy link
Collaborator

STRML commented Feb 20, 2017

I think a callback would be better; that way users can add any custom behavior they like.

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

Successfully merging this pull request may close these issues.

Improved handling of document body scale transformations

2 participants