Open ustccjw opened 5 years ago
Yeah, it would be great to have it, because there is no callbacks at the moment, such as: onDragStart, onDragStop, onResizeStart, onResizeStop.
@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 when Orientation/Position/Size has been changed by props,component will change the Orientation/Position/Size state
- this is my need.
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.
make
react-mops
to be a control component