DylanVann / ant-design-draggable-modal

The Modal from Ant Design, draggable.
https://ant-design-draggable-modal.netlify.com
MIT License
166 stars 54 forks source link

Initial size of modal #8

Closed sunqiang-leo closed 4 years ago

sunqiang-leo commented 5 years ago

This component should allow user to set initial size (height, width) of the modal while still allow do re-size operation.. In current implementation, if height or width is set through props, then there is no way to do the resize operation.

madalinul commented 5 years ago

Also when setting width and height the drag functionality is limited to just a small area of the viewport.

iversonwool commented 4 years ago

When I set the modal width to 1200px, the modal box is not centered, only when I set 800px, the modal is centered.

DylanVann commented 4 years ago

I added initialWidth and initialHeight as props to the latest version (0.0.16).

As of now you probably shouldn't use width and height, maybe in the future in a controlled mode.