Skip to Content

OnMove

GitHub 上的源代码 

¥Source on GitHub 

OnMove 类型是每当视口移动时(通过用户交互或编程方式)都会触发的回调。它接收触发事件和新的视口状态。

¥The OnMove type is a callback that fires whenever the viewport is moved, either by user interaction or programmatically. It receives the triggering event and the new viewport state.

type OnMove = (event: MouseEvent | TouchEvent | null, viewport: Viewport) => void;
Parameters:
NameTypeDefault
eventMouseEvent | TouchEvent
viewportViewport
Returns:
void
Last updated on