Global

Type Definitions

Rect

Source:
Properties:
left: number
top
top: number
width: number
height: number
Type:
  • TSInterface

OnScrollDrag

Source:
Properties:
next: (inputEvent: any) => void
Type:
  • TSInterface

OnScroll

Source:
Properties:
container: HTMLElement
direction: number[]
inputEvent: any
Type:
  • TSInterface

OnMove

Source:
Properties:
offsetX: number
offsetY: number
inputEvent: any
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
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:
scroll: OnScroll
move: OnMove
scrollDrag: OnScrollDrag
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
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.
isDrag optional
isDrag?: boolean
inputEvent optional
inputEvent?: any
prevScrollPos optional
prevScrollPos?: number[]
direction optional
direction?: number[]
Type:
  • TSInterface