Closed rewbs closed 1 year ago
What are you saying! You don't need any hook for that as it works right out of the box. When you click on the header section of the timeline then the cursor will move to that point.
By header section I was taking about this portion of the timeline
Yes it moves the cursor. But if I have an external component that reacts to the cursor position, I need to update it with the new cursor position. Currently I can only get the cursor position via a callback when the cursor is dragged, not when it is clicked.
It’s definitely possible as I have this functionality implemented.
It’s definitely possible as I have this functionality implemented.
Great! Which callback are you using to get the cursor position when the header is clicked?
I have just added
onClickTimeArea
api, you can try this version v0.1.8
Thanks, that works perfectly.
Sorry, @rewbs I misunderstood your question and when I faced the exact same issue today I realised what you were saying. Thanks ❤️
Also can you make the onClickTimeArea to take void too? Or am I doing something wrong!
Hi, thanks for the great work.
I need my UI to react to the cursor changing position. The onCursorDrag callback works for most cases, but users can also click on the timeline (without dragging) to set the cursor time. As far as I can tell there's no hook for this event that includes the cursor time in the event object. Could we possibly get one? Thanks!