-
-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is It Possible To Set Bound Dynamically? #895
Comments
This is the patch I used to achieve this. It adds a new prop called
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I Have A Question
Is it possible to set an initial boundary like "parent" to limit resizing, but, when dragging, change that bound to a bigger container?
I'm using react-rnd 10.3.7
My browser is Chrome Version 107.0.5304.122 (Official Build) (64-bit)
I could not find any reported issues that describe what I'm asking.
Description
I have several divs each with a class of "page" (dark blue solid border) and they are all contained within a single scrolling div (green dashed border). Within a given "page" div I have several components (one is shown with a pale blue border and yellow background), each with a bound prop set to 'parent' which limits their sizes to be entirely within the "page" boundary. This works perfectly.
What I'd like to do next is be able to drag any of these to other pages. This would require me to somehow break out of the current parent boundary so that it can be allowed to cross over to another page. The restriction that I have is that it cannot be dropped between pages (i.e., into the red zone between pages). Obviously the bound of "parent" is currently preventing this desired functionality, but, at the same time it is working to limit their sizes to be within the page. If I set the bound to be a class name for the scrolling container div, it will allow the dragging between pages, however, it can be dropped into the red zone and, more importantly, allows the sizes to overflow and even span pages which is not desirable.
Can this be done with a "dynamic" bound somehow? Any feedback and suggestions are greatly appreciated.
The text was updated successfully, but these errors were encountered: