UNPKG

@bigbinary/react-timeline-editor

Version:

[![npm version](https://img.shields.io/npm/v/@bigbinary/react-timeline-editor.svg?style=flat-square)](https://www.npmjs.com/package/@bigbinary/react-timeline-editor) [![npm downloads](https://img.shields.io/npm/dm/@bigbinary/react-timeline-editor.svg?styl

25 lines (24 loc) 898 B
import React, { FC } from 'react'; import { ScrollSync } from 'react-virtualized'; import { CommonProp } from '../../interface/common_prop'; import './cursor.less'; /** 动画时间轴组件参数 */ export type CursorProps = CommonProp & { /** 距离左侧滚动距离 */ scrollLeft: number; /** 设置光标位置 */ setCursor: (param: { left?: number; time?: number; }) => boolean; /** 时间轴区域dom ref */ areaRef: React.MutableRefObject<HTMLDivElement>; /** 设置scroll left */ deltaScrollLeft: (delta: number) => void; /** 滚动同步ref(TODO: 该数据用于临时解决scrollLeft拖住时不同步问题) */ scrollSync: React.MutableRefObject<ScrollSync>; /** Internal */ onCursorMoveStart?: () => void; onCursorMoveEnd?: () => void; }; export declare const Cursor: FC<CursorProps>;