Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onClickCursor and onDoubleClickCursor events #28

Open
prismosoft opened this issue Mar 7, 2023 · 1 comment
Open

Add onClickCursor and onDoubleClickCursor events #28

prismosoft opened this issue Mar 7, 2023 · 1 comment

Comments

@prismosoft
Copy link

prismosoft commented Mar 7, 2023

Hi @xzdarcy, Great job on this very useful timeline editor, loving it!

Is it possible to add 2 more simple events, onClickCursor and onDoubleClickCursor ?

Here is what's happening:

I am using onClickActionOnly and using the time parameter to set the current time whenever an action is clicked.
This works well.

I also use the onDoubleClickAction to trigger something else.

The problem is, on the first click, the time gets updated, and the cursor is being updated and placed just below where the second click is happening. So the double click event is not being triggered, the cursor is being clicked instead. So unless I remove my setTime function from within the onClickActionOnly event, the onDoubleClickAction is being ignored.

So I thought, if you could add events on the cursor as well, I could use those instead. Unless there is another way...

@prismosoft
Copy link
Author

I actually fixed the problem by adding a transition to the cursor! It's actually a nice transition, and the double click works because it happens before the end of the transition 👍

.timeline-editor-cursor {
    transition: left 0.3s;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant