-
Notifications
You must be signed in to change notification settings - Fork 559
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
Using the new JS API with ResizeObserver to detect parent resize #330
base: v2
Are you sure you want to change the base?
Conversation
Thank you for the PR! I've taken a brief look at the implementation, but I don't get the point of the |
handleParentResize update the boundaries when parent container is resized, windows are automatically moved no click action are required on the windows |
I recently encountered the same issue where the draggable component overflows the boundaries of the parent container after the parent is resized. In theory, the dimensions of the parent container shouldn't be altered. If a resize listener is added to the parent component, the draggable component will recalculate its boundary values internally, which could lead to conflicts between the component's coordinates and the boundary values. I think the logic code itself needs to handle this to prevent such occurrences. |
Did my patch fix this issue for you ? |
Your idea is good. But I finally choose to setup different "key" to force re-render the components while it could re-calculate the boundary when I need. |
I had trouble with the parent resize, windows was sometimes dragged outside the parent limits, i am using it in my 3D viewer for the GUI, no problem since i implemented the ResizeObserver