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

How would one only allow dragging on a certain direction? #467

Closed
ckknight opened this issue Jun 1, 2016 · 2 comments
Closed

How would one only allow dragging on a certain direction? #467

ckknight opened this issue Jun 1, 2016 · 2 comments
Labels

Comments

@ckknight
Copy link

ckknight commented Jun 1, 2016

What I would like to enable is a list of items (on the top of the screen, for this example) where if they are dragged down, then the regular drag-and-drop mechanism works, but if the user drags left/right, then that list can scroll left or right (via overflow-x: scroll or similar).

What I have done previously (not in React, mind you) is wait for the touch to move 30px, calculate the direction, and then allow for the drag events to propagate based on the angle.

Is this possible with react-dnd?

@tthomas7
Copy link

The FAQ mentions implementing a custom drag layer to constrain the movement rendered. That's easy but I think it's mostly a rendering layer, scrolling the list left and right would be a separate thing.

Check out this issue for ideas. It sounds like the list is both a drag source and a drop target and implements logic on hover.

@stale
Copy link

stale bot commented Jul 6, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 6, 2019
@stale stale bot closed this as completed Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants