You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncomment the last line (//timeline.finish()) and run it again. The blue box reaches the wrong position (if my understanding of the API of timeline is correct).
Explanation
Timeline.finish() calls Timeline.getEndTime(). getEndTime() only looks at the last Runner in timeline._runners to calculate the endtime. In my example, the last element in this array does not have the latest endtime; in my example, the first element in this array has the latest endtime.
How to fix
I think it could be enough to loop over all runners in getEndTime() and find the runner with the latest endtime.
As long as it is not fixed: I make sure that the runner with the latest endtime is in the last position.
The text was updated successfully, but these errors were encountered:
Good catch. It also seems that getEndTime is not time critical so looping over all runners could be a fix.
However, getEndTime is also used in schedule and for that it has to work like it is atm. So a replica of the old method is needed
Bug report
Fiddle
Try this codepen:
https://codepen.io/michAtEl/pen/KJYBzP
Uncomment the last line (//timeline.finish()) and run it again. The blue box reaches the wrong position (if my understanding of the API of timeline is correct).
Explanation
Timeline.finish() calls Timeline.getEndTime(). getEndTime() only looks at the last Runner in timeline._runners to calculate the endtime. In my example, the last element in this array does not have the latest endtime; in my example, the first element in this array has the latest endtime.
How to fix
I think it could be enough to loop over all runners in getEndTime() and find the runner with the latest endtime.
As long as it is not fixed: I make sure that the runner with the latest endtime is in the last position.
The text was updated successfully, but these errors were encountered: