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

AutoScroll absolute thresholds and acceleration #1414

Open
Goues opened this issue May 24, 2024 · 0 comments
Open

AutoScroll absolute thresholds and acceleration #1414

Goues opened this issue May 24, 2024 · 0 comments

Comments

@Goues
Copy link

Goues commented May 24, 2024

Hey, I'm in the process of migrating from an old and outdated drag and drop library to DND Kit and it's been a great experience. There is just one issue I don't think I can solve easily with available public API. My drag & drop is across the full document, like sorting elements on the whole website. The height of the document can be like 10000 pixels as a result.

However, the autoScroll component of DND Kit uses relative values for acceleration and thresholds, so if I take the default threshold of 0.2, I get scrolling all over the place, because 20 % of 10000 pixels is pretty much the entire viewport. However, I can't choose a super low value because the document can be small.

Does anybody have any ideas for making auto scroll work with absolute values instead? I'd like to set threshold to 200 pixels or something like that.

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

1 participant