react-rnd icon indicating copy to clipboard operation
react-rnd copied to clipboard

setting bounds prop with a position object

Open ItayBa opened this issue 4 years ago • 1 comments

Hey, I am using react-rnd v10.2.4 with chrome 75; Using react-draggable , I used to set bounds prop to a position object {top,bottom,left,right} ; In react-rnd there was a workaround option for doing that via the draggableProps prop , but it was removed from the API. The reason I need this option is because my app is using a map service(Cesium) with an app bar component fixed on top of the map, and I did not want my components to have the ability of been dragged over my app bar component. It would be really great if bounds prop would also accept a position object , or draggableProps prop would return in the next version.

Thank you for your time

ItayBa avatar Jan 26 '21 10:01 ItayBa

I am also using react-rnd (v10.1.10) with chrome 87. I have no problem in updating react-rnd in v10.2.4 or higher if this is necessary. I would like to be able to drag some popups -20px and +20px from the screen (so that we cannot see the beginning or the end of the popup) but I can do that for all the popups that open by updating the width and the margin of the div above the rnd div, not for the one I choose. That's why I need also the draggableProps prop as ItayBa told now that it used to exist.

dana2208 avatar Jan 28 '21 07:01 dana2208