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

Support Orientation/Position/Size props change #11

Open
ustccjw opened this issue Oct 23, 2019 · 4 comments
Open

Support Orientation/Position/Size props change #11

ustccjw opened this issue Oct 23, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@ustccjw
Copy link

ustccjw commented Oct 23, 2019

make react-mops to be a control component

@pawelkosmicki
Copy link

Yeah, it would be great to have it, because there is no callbacks at the moment, such as: onDragStart, onDragStop, onResizeStart, onResizeStop.

@pixelass
Copy link
Owner

@ustccjw can you better explain what you expect? (codesample)

@pawelkosmicki There are callbacks for all of them
here's an example: https://github.com/dekk-app/react-mops/blob/master/packages/demo/src/pages/home.tsx#L235-L243 where I use it in combination with redux.

onResizeStart, onResize, onResizeEnd
onDragStart, onDrag, onDragEnd
onRotateStart, onRotate, onRotateEnd

I am currently working on v2. It will include a documentation with better examples.

@pixelass pixelass added the question Further information is requested label Oct 25, 2019
@ustccjw
Copy link
Author

ustccjw commented Oct 28, 2019

@pixelass when Orientation/Position/Size has been changed by props,component will change the Orientation/Position/Size state - this is my need.

@pixelass
Copy link
Owner

Right now those props only serve as initialStates. In v2 you can build your own custom box to add this feature.

v2 will most probably deliver several dedicated components with different behavior, so once implemented this could be added by a PR as new export.

I see how this can be helpful and it will definitely be added since I myself need this feature eventually.

@pixelass pixelass added enhancement New feature or request and removed question Further information is requested labels Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants