-
Notifications
You must be signed in to change notification settings - Fork 317
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
disabling Draggabilly also disables touch events #367
Comments
Thanks for reporting this issue. Yes, when you initialize Draggabilly on all the content on the page, then there is no where left for the user to touch scroll on that page. There is no built in solution at the moment. But you could get creative: Add space on the left or right so the grid does not up the entire window. You may also be interested in desandro/draggabilly#97 |
I've actually been trying to init and destroy the drag array dynamically. The idea I had was that when you tap enable drag, it instantiates drag and binds. When you tap disable drag, it destroys the drag objects because the items have already been placed. The advantage is scroll starts working. This situation will also work for me. However, when I try that, the packery layout messes up. Here is a forked codepen In this example, I instantiate drag when you tap on enable. When you tap disable, I attempt to delete it, but the packery layout messes up. Can you tell me what I am missing? If I get this approach working, my objective of being able to scroll when not dragging is met. |
I recommend enabling and disabling Draggabilly with the |
Bravo! Thank you! That works very well. I'll do some more testing and will close. |
Can you please just write a simple example using enable and disable methods with unbindHandles and bindHandles? |
This code example associates a drag handler to each packery element and disables them
This code re-enables drag at any time
|
Hi there, please see this example:
http://codepen.io/pliablepixels/pen/vGdVOa
Please resize the window to be able to scroll up and down.
This is a not a problem for desktops as you can still use a mouse wheel to scroll the browser window, but for touch devices, it takes away the ability to scroll the window when drag is disabled.
Would you have a suggestion on how to address this issue? Ideally, disabling drag should still pass events back to the browser for normal operation.
The text was updated successfully, but these errors were encountered: