-
Notifications
You must be signed in to change notification settings - Fork 167
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
Timeline: getTarget #32
Comments
The html elements of the Timeline itself are "hidden" from the outside. If you need the position of an item, you can enclose your own HTML element in the
And inside your select event listener:
|
Thank you for your reply. I found out that an HTML classname 'timeline-event-selected' is added to the element being selected which allowed me to find its position. I added a listener on 'rangechange' so that my new element can follow the one being selected but it does not work well when applying a drag event on the timeline. The position of my new element is updated only at the next drag event, so following one step behind. Scrolling works well though except when scrolling really fast my new element is somewhat left behind. |
Glad you have a solution. Anyway, alternatively, you could insert some HTML+JS+CSS in the Timeline events, and really attach your floating element to a Timeline event (not needing to adjust the position via event listeners using javascript). |
Sounds good I'll have a look into that as soon as possible |
Hi,
I would like to get the css position of a selected item on the timeline. I have added a listener for the select event. It seems that the only function that I can use to obtain this position is the getTarget(event) function which returns the HTML object. However, I am not sure that I understand correctly getTarget(event). I tried the following approach without success:
Any idea on solving this problem?
Thank you in advance
The text was updated successfully, but these errors were encountered: