-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Vertical scroll for Draggables bound to X-axis #221
Comments
Watch |
I went through to code of Draggable and DraggableCore to better understand. I tried returning I would like to let the parent / page / body receive vertical drags and scroll as if the Here is a link to picture what I mean : https://ibb.co/iyGxBF. |
Hmm, you shouldn't have any problem if you use the |
From your demo http://mzabriskie.github.io/react-draggable/example/ When you drag the second item "I can only be dragged horizontally (x axis)" vertically, it doesn't move the item (as expected) but it also doesn't let the page scroll. I wish the page could scroll vertically when the item is bound horizontally (to the x-axis). This is the behaviour for html elements with horizontal overflow: dragging vertically will let the container scroll, while dragging horizontally will scroll the item. Thank you for the quick replies as always ! |
@STRML Does it sound doable to you ? If you have some ideas, I will try to implement them and do a pull request |
So what is the solution for this problem ? |
Was there ever a solution for this? |
Hi, this works for me: onDrag={(e, data) => { |
Hello,
There is a feature I'd like to add: the idea is to prevent the
Draggable
from intercepting vertical scroll events if bound to the horizontal axis.Let's say we have a
<Draggable axis='x' />
, it would be great to only drag theDraggable
on horizontal drags, and let the container / page scroll on vertical drags ?This is the default behaviour for scrollable items on mobile devices. I have no idea how to implement it but I believe it could be useful to many. Is it doable ?
The text was updated successfully, but these errors were encountered: