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
{{ message }}
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.
In version 4.12.0 I was able to successfully use setWindow() and focus() immediately after creating a Timeline and setting its data, i.e. the view would land wherever those functions were told to go, without having to care for whether the timeline had finished initializing or not.
In version 4.17.0, however, calling setWindow() or focus() right after initializing the timeline will not work. The view will stay somewhere off the target. I suspect this happens because the timeline hasn't finished initialization before the functions are called.
As a workaround I am subscribing to the 'changed' event and then calling the functions inside. I then unsubscribe to the event. However, as much as this is an effective solution to achieving the initial goal, there seems to be a delay between the timeline is first shown and the 'changed' event is called, so what happens is that for a brief second the timeline shows up only to suddenly move to wherever setWindow() or focus() point it to. I managed to also workaround this by hiding the timeline and showing it inside the 'changed' event callback.
I'm not using animation.
Now, I've successfully mitigated the issue, but the solution seems a bit clunky to me coming from 4.12.0 where it just worked without subscribing to events and hiding the timeline before it was ready to show.
Was this a regression or is it the official way of doing things? Is there a better way to use setWindow() or focus() right after the timeline is created?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
In version 4.12.0 I was able to successfully use setWindow() and focus() immediately after creating a Timeline and setting its data, i.e. the view would land wherever those functions were told to go, without having to care for whether the timeline had finished initializing or not.
In version 4.17.0, however, calling setWindow() or focus() right after initializing the timeline will not work. The view will stay somewhere off the target. I suspect this happens because the timeline hasn't finished initialization before the functions are called.
As a workaround I am subscribing to the 'changed' event and then calling the functions inside. I then unsubscribe to the event. However, as much as this is an effective solution to achieving the initial goal, there seems to be a delay between the timeline is first shown and the 'changed' event is called, so what happens is that for a brief second the timeline shows up only to suddenly move to wherever setWindow() or focus() point it to. I managed to also workaround this by hiding the timeline and showing it inside the 'changed' event callback.
I'm not using animation.
Now, I've successfully mitigated the issue, but the solution seems a bit clunky to me coming from 4.12.0 where it just worked without subscribing to events and hiding the timeline before it was ready to show.
Was this a regression or is it the official way of doing things? Is there a better way to use setWindow() or focus() right after the timeline is created?
Thanks.
The text was updated successfully, but these errors were encountered: