-
Notifications
You must be signed in to change notification settings - Fork 631
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
add support for scrolling by dragging #240
base: master
Are you sure you want to change the base?
add support for scrolling by dragging #240
Conversation
Thank you for this code. I have been fighting this issue for some time. I'm using JQuery UI (sortable) along with the jscrollpane and the struggle I'm having now is that when I drag an item, once it starts scrolling the helper (dragging item) simply scrolls with the other content and away from the mouse. Is there any way around this? Has anyone else experienced this issue? |
Omgosh! I think I just solved it. I found an old archived version of a discussion that Kelvin had with another user waayy back in 2009 about using jquery sortable with jscrollpane (the helper moving away from the mouse while scrolling). Now, while we're on new versions of both components, this code still ended up solving my issue: // We need to do it differently so it works in jScrollPane... Basically, we're just telling jquery sortable to clone the helper and also append to the body instead of the list and then tell jscrollpane that while it's scrolling to "refreshPositions" on the sortable component...and boom!! It works! Omgosh, I have been fighting this for hours and hours and hours...needing it for multiple components. THANK YOU KELVIN, and thank you Tak0303 (I'm using your dragging code as well in jscrollpane), and definitely should mention that web.archive.org was a lifesaver since the original example was taken down. :P Figured I'd post the answer I discovered here so others might not spend so long searching!!! >.< |
Thanks for the pull request @tak0303 and sorry for the very slow reply. I've just tried to integrate the PR but unfortunately it doesn't work with horizontal scrollbars (the old plugin didn't support horizontal scrollbars so it wasn't necessary there). Would you be able to update the PR with support for situations with horizontal scrollbars? Thanks! |
@vitch thanks for replying, and i'll fix it and update PR soon :) |
@vitch sorry, I can't add horizontal scroll with dragging feature at once. |
@takashi, How you make 'horizontal scroll with dragging feature'? Can you help me? |
@takashi this is still working with version 1.x and do you have time to update this to work with jQuery 3 as there is bind and unbind used which are jQuery below 1.7 stuff. |
this closes #4
add support for scrolling by dragging.
I added event when the element which is dragged and the event only gets fired when the element is out of the scroll pane.