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

Drag by a specific amount #29

Open
hkutcher opened this issue Mar 20, 2017 · 2 comments
Open

Drag by a specific amount #29

hkutcher opened this issue Mar 20, 2017 · 2 comments

Comments

@hkutcher
Copy link

Great tool. :-) Would you consider adding a parameter or setting to allow scrolling by a specific amount? The area I'm scrolling has columns of info and I'd like to "snap to column", that is, force scrolling by whole columns, not fractions of a column. My columns are 240px, so I was doing this like $(".scroller").scrollLeft(parseInt(this.scrollLeft / 240) * 240);. This no longer works when I add .dragscroll.

@asvd
Copy link
Owner

asvd commented Mar 20, 2017

What is the exact issue:

  • Would you like dragscroll to snap to the given position (i.e. scroll further to reach the needed position upon mouse button release), or..

  • Does your code stops working if you add .dragscroll?

@hkutcher
Copy link
Author

Both. Yes, my code no longer works, because dragscroll overrides it. I would like dragscroll to go to the next logical increment, round up or down in increments of the column width, which is 240px, however, ideally col width/increment/snap to amount would be configurable.

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

2 participants