You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added new `restrictToSpecificParent` modifier that allows restricting dragging within a specific parent element's boundaries using React refs. This is useful when you need to constrain movement to a container that isn't the immediate parent element.
Copy file name to clipboardExpand all lines: packages/modifiers/README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,29 @@ Restrict movement to only the vertical axis.
54
54
55
55
### Restrict motion to a container's bounding rectangle
56
56
57
+
#### `restrictToSpecificParent`
58
+
59
+
Restrict movement to a specified parent element's bounding rectangle. This modifier can be useful when you need to constrain movement to a specific container rather than the immediate parent.
Restrict movement to the edges of the window. This modifier can be useful to prevent the `DragOverlay` from being moved outside of the bounds of the window.
0 commit comments