xzdarcy / react-timeline-editor

react-timeline-editor is a react component used to quickly build a timeline animation editor.
https://zdarcy.com/
MIT License
284 stars 82 forks source link

Add custom onCursorDrag event #11

Closed reactone closed 1 year ago

reactone commented 1 year ago

There are already events for onCursorDragStart and onCursorDragEnd. I need to get the time every time the cursor is moved so that the video timing is updated whenever I move the cursor.

xzdarcy commented 1 year ago

There are already events for onCursorDragStart and onCursorDragEnd. I need to get the time every time the cursor is moved so that the video timing is updated whenever I move the cursor.

You can use the TimeLineEffectSource to control the timing of the effects. You can refer to this demo: demo. image

Or maybe you can use TimelineState.listener.on('afterSetTime', ({time, engine}) => {...}) to monitor manual time changes. image