Closed pixelzoom closed 7 years ago
If there user switches back to a screen quickly, they may still see the marker editor moving.
I have tried several times to catch the rouge animated marker editor in dev.57, but to no avail. Let's go with option (1) @pixelzoom.
Closing this issue as "won't fix".
The marker editor is currently animated using TWEEN. When switching screens, TWEEN animations are not paused, they continue to run. (This is a joist problem, see https://github.com/phetsims/joist/issues/404.) And screens don't know when they become inactive, so they can't pause/cancel a TWEEN animation. So we're currently stuck with the marker editor continuing to animate when we switch to a different screen.
Options:
Don't worry about it. In practice, the marker editor moves quickly, and doesn't require a lot of resources. If there user switches back to a screen quickly, they may still see the marker editor moving. But it's more likely that they'll see that the marker editor has moved to it's final destination, and the animation will have completed.
Ditch TWEEN and handle animation in the model (
model.step
). This would involve makingMarkerEditor
extendMovable
, and animation would then pause when switching screens. The downside here is thatMovable
has no ease-in/ease-out support, and adding that is one more task I really don't need.I'm leaning towards (1). @arouinfar thoughts?