This repository was archived by the owner on Jul 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
autoScroll
Karl edited this page Oct 30, 2018
·
21 revisions
Enables auto-scrolling when dragging in an scrollable container.
The option has two properties:
-
threshold- the number of pixels from the edge of the container before auto-scrolling is started. Defaults to40. A negative value will trigger autoscroll when the mouse/pointer is outside the container by the defined amount - e.g, a value of-50will cause autoscrolling to start when the mouse/pointer is 50 pixels above / below the container. -
increment- the amount in pixels to scroll the container. Defaults to20.
const selectable = new Selectable({
autoScroll: {
threshold: 40,
increment: 20,
}
});To disable the feature just set the option to false.
const selectable = new Selectable({
autoScroll: false
});