Type Definitions
Rect
- Source:
Properties:
Type:
- TSInterface
OnScrollDrag
- Source:
Properties:
Type:
- TSInterface
OnScroll
- Source:
Properties:
Type:
- TSInterface
OnMove
- Source:
Properties:
Type:
- TSInterface
DragScrollOptions
- Source:
Properties:
container:
string | (() => HTMLElement) | HTMLElement | {current?: HTMLElement | null} | {value?: HTMLElement | null}
The area to detect scrolling through dragging. scroll container
threshold
optional
Default Value: 0
threshold?:
number
Distance at which to start scrolling from the start or end points
getScrollPosition
optional
Default Value: [container.scrollLeft, container.scrollTop]
getScrollPosition?:
(param: {container: HTMLElement, direction: number[]}) => number[]
How to get scrollPosition
requestScroll
optional
Default Value: null
requestScroll?:
((param: OnScroll) => void) | null
Request if there is a need to be scrolled through drag.
Only use one of the scroll event or requestScroll options.
throttleTime
optional
Default Value: 0
throttleTime?:
number
How often to re-scroll when the drag stays at the start or end.
If 0, it does not occur.
useScroll
optional
Default Value: false
useScroll?:
boolean
Set to true if only scrolling is enabled.
Set to false if re-scroll check is required
checkScrollEvent
optional
checkScrollEvent?:
boolean | ((container: HTMLElement, callback: () => void) => () => void)
Dragging occurs via native scrolling.
If set to true, native scroll events can be registered/unregistered.
If you want to add it manually, set the return event unregisteration function to the event registration function.
Type:
- TSInterface
DragScrollEvents
- Source:
Properties:
Type:
- TSInterface
CheckScrollOptions
- Source:
Properties:
container:
string | (() => HTMLElement) | HTMLElement | {current?: HTMLElement | null} | {value?: HTMLElement | null}
The area to detect scrolling through dragging. scroll container
threshold
optional
Default Value: 0
threshold?:
number
Distance at which to start scrolling from the start or end points
getScrollPosition
optional
Default Value: [container.scrollLeft, container.scrollTop]
getScrollPosition?:
(param: {container: HTMLElement, direction: number[]}) => number[]
How to get scrollPosition
requestScroll
optional
Default Value: null
requestScroll?:
((param: OnScroll) => void) | null
Request if there is a need to be scrolled through drag.
Only use one of the scroll event or requestScroll options.
throttleTime
optional
Default Value: 0
throttleTime?:
number
How often to re-scroll when the drag stays at the start or end.
If 0, it does not occur.
useScroll
optional
Default Value: false
useScroll?:
boolean
Set to true if only scrolling is enabled.
Set to false if re-scroll check is required
checkScrollEvent
optional
checkScrollEvent?:
boolean | ((container: HTMLElement, callback: () => void) => () => void)
Dragging occurs via native scrolling.
If set to true, native scroll events can be registered/unregistered.
If you want to add it manually, set the return event unregisteration function to the event registration function.
Type:
- TSInterface