Skip to content

Conversation

@htomo1122
Copy link

Summary

  • Add ResizeObserver to monitor parent element size changes
  • Update drag/resize bounds when parent size changes
  • Adjust element position and size to stay within parent bounds

Problem

When parent container size changes dynamically, the element's bounds are not updated and can overflow outside the parent.

Solution

  • Use ResizeObserver to detect parent size changes
  • Recalculate bounds during drag/resize operations
  • When parent shrinks: move element to fit, then reduce size if needed (respecting minWidth/minHeight)

Related

Fixes the issue that #429 attempted to address.

@htomo1122 htomo1122 changed the title Fix/add resize observer for parent fix: add resize observer for parent Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant