calico icon indicating copy to clipboard operation
calico copied to clipboard

Fixed "none" TextAnimation

Open floriancargoet opened this issue 1 year ago • 2 comments

The "none" text animation has multiple bugs:

  • the methods in the animation call Element methods with this instead of el
  • Element.added() should not set the opacity of the el to 0. It is the responsibility of the fade animation and that's what it does. Always setting the opacity to 0 doesn't make sense for the "none" animation and for any custom animation not based on opacity.

This PR fixes both issues.

floriancargoet avatar Nov 28 '22 12:11 floriancargoet

Element.added() should not set the opacity of the el to 0. It is the responsibility of the fade animation and that's what it does. Always setting the opacity to 0 doesn't make sense for the "none" animation and for any custom animation not based on opacity.

It's been a while since I designed these systems, but from what I remember, this approach may have been necessary in order to make "fade in"-style animations work. I don't have time to verify this right now, but I'll get this resolved ASAP.

elliotherriman avatar Nov 30 '22 02:11 elliotherriman

The fade animation does set the opacity to 0 itself in its added function so removing it from Element.added does not break "fade" but fixes "none".

floriancargoet avatar Nov 30 '22 07:11 floriancargoet