-
Notifications
You must be signed in to change notification settings - Fork 7
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
Is translate3d(-50%, -50%, 0) needed on wrapperStyle? #8
Comments
I am currently working on v2 which provides hooks to build your own component. v1 is still rather limited in mixing with other components. You can use the This library is still young and was extracted from an app I'm working on, so its features were based on my initial needs. Future version will add more flexibility. |
Can you create a codesandbox to illustrate your issue? Maybe I can find a fix for you. |
@bluematter Can you create a codesandbox of your issue? Template: https://codesandbox.io/s/react-mops-issue-template-jodfo I am closing in on v2 and would like to see if you issue can be tackled with the new mechanisms. |
I'll see if I can put something together soon. Currently hitting it hard on https://storycreatorapp.com. Dragging and dropping is one of the main features of the app. I am using https://react-dnd.github.io/react-dnd/examples/drag-around/custom-drag-layer. Redux is being used under the hood. Then I have another resizing element that listens to the drag and uses CSS transforms to move. The reason I am doing this is that I believe it's a better UX to have the content in the drag be hidden and the resizer be shown. I really like your library and think its awesome work. I am struggling with getting the performance down and want a solution that is a little less of a headache. However, there are limitations, this being one of them. |
Performance has been improved in v2. I‘ll ping you if I have an alpha/beta |
Problem
I am using React DND to handle dragging. I need it because redux is implemented under the hood which gives me the ability to have one drag layer and multiple layers subscribed to the movements.
I have a HOC that wraps a component and manages the x, y transform. So I am wrapping your lib with the x,y positioning. Your lib is being used for the wonderful handle logic that moves from the different corners.
I'll send the values to a higher level and rerender down to resize all the elements wrapped.
Solution
I'd simply like to see if we could remove the
translate3d(-50%, -50%, 0)
set on thewrapperStyle
or have a way to override it.Alternatives
I am considering managing my own state. However, I can't really do much because
wrapperStyle
always overridesstyle
https://github.com/dekk-app/react-mops/blob/master/packages/react-mops/src/box.tsx#L283The text was updated successfully, but these errors were encountered: