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

I just want my Element that can only be moved to viewport,because my element is position of fixed。but I set bounds="body" and cannot work,is still can move in the direction of down while out of viewpoint

Open hututuhu opened this issue 2 years ago • 5 comments
trafficstars

<Draggable
    disabled={!isDraggable}
    handle=".br-modal__header"
    defaultClassNameDragged="br-modal__default-drag"
    positionOffset={unblock ? { x: '-50%', y: '-50%' } : undefined}
    cancel={resizable ? '.react-resizable-handle' : undefined}
    bounds="body"
  >
    {resizeElement}
</Draggable>

image

hututuhu avatar Mar 20 '23 10:03 hututuhu