Hi Meik, You animation plugin is nice but I have some integration problems

Hi Meik,

You animation plugin is nice but I have some integration problems.
For the first VaadinSession after boot, everything is fine.
But if I close the session, that makes a new UI instance, then the Animation state keeps reference to the old session/UI, that leads to various problems.

Did you ever note some problem related the Animator singleton ?

(I’m on Vaadin/Flow 14.4.5/2.4.4 and your 1.1.2)

BR, Franck

This is my workaround :

  • Patched your Animator class to have default constructor as public
  • Animator instantiation is in the UI class (that we override
@SpringComponent
public class SoftbridgeUI extends UI {
    ...
    Animator animator;
    public Animator getAnimator() {
        if (animator == null) {
            animator = new Animator();
            add(animator);
        }
        return animator;
    }
}

The I use the animator like that :

((SoftbridgeUI)UI.getCurrent()).getAnimator() ...`

Should help…

never had such a problem, but I made the constructor of Animator public, so that you can use just like you want (Version 1.1.3)