vue-draggable-resizable icon indicating copy to clipboard operation
vue-draggable-resizable copied to clipboard

Using the new JS API with ResizeObserver to detect parent resize

Open ghazette opened this issue 3 years ago • 5 comments

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

ghazette avatar Jan 06 '22 14:01 ghazette

Thank you for the PR!

I've taken a brief look at the implementation, but I don't get the point of the handleParentResize function. Looks like that it works even without it.

mauricius avatar Jan 10 '22 18:01 mauricius

handleParentResize update the boundaries when parent container is resized, windows are automatically moved no click action are required on the windows

ghazette avatar Jan 31 '22 09:01 ghazette

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.

lihuaabcder avatar Nov 09 '23 17:11 lihuaabcder

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 ?

ghazette avatar Nov 11 '23 18:11 ghazette

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.

lihuaabcder avatar Jan 29 '24 15:01 lihuaabcder