From 0bdfe48f09b873e8dfd36d4bb27f43bad16f7ce3 Mon Sep 17 00:00:00 2001 From: Alexei Anoshenko <2277098+anoshenko@users.noreply.github.com> Date: Fri, 6 Dec 2024 20:00:53 +0300 Subject: [PATCH] Update animation.go --- animation.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/animation.go b/animation.go index 1bab006..b170980 100644 --- a/animation.go +++ b/animation.go @@ -319,8 +319,8 @@ func NewTransitionAnimation(timingFunc string, duration float64, delay float64) // or alternate back and forth between playing the sequence forward and backward. Only the following values ​​can be used: // 0 (NormalAnimation), 1 (ReverseAnimation), 2 (AlternateAnimation), and 3 (AlternateReverseAnimation); // - iterationCount - specifies the number of times an animation sequence should be played before stopping. A negative value specifies infinite repetition; -// - property - describes a scenario for changing a View's property. -func NewAnimation(id string, timingFunc string, duration float64, delay float64, direction int, iterationCount int, property ...AnimatedProperty) AnimationProperty { +// - property, properties - describes a scenario for changing a View's property. +func NewAnimation(id string, timingFunc string, duration float64, delay float64, direction int, iterationCount int, property AnimatedProperty, properties ...AnimatedProperty) AnimationProperty { animation := new(animationData) animation.init() @@ -353,7 +353,9 @@ func NewAnimation(id string, timingFunc string, duration float64, delay float64, animation.Set(IterationCount, iterationCount) } - if len(property) > 0 { + if len(properties) > 0 { + animation.Set(PropertyTag, append([]AnimatedProperty{property}, properties...)) + } else { animation.Set(PropertyTag, property) }