Skip to content
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

Support setting bounds when dragged element is bigger than the parent #128

Open
davjhan opened this issue May 7, 2023 · 0 comments
Open

Comments

@davjhan
Copy link

davjhan commented May 7, 2023

The bounds param breaks short in use cases where the dragged element is bigger than the parent.
For example, imagine a pannable graph of 1000 x 1000 pixels shown in a viewport of 400 x 400 pixels. Here, the bounds = 'parent' bricks the entire draggable, because mathematically, at least one side must be out of bounds.

Suggestions:

Support something like DragBounds but where the bounds are relative to the parent's local coordinates instead of the window.


Also, a way to easily implement overscroll would be great.

Thanks!

@davjhan davjhan changed the title Support for setting bounds when dragged element is bigger than the parent Support setting bounds when dragged element is bigger than the parent May 7, 2023
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

No branches or pull requests

1 participant