public virtual async Task AnimatedShow(TransitionAnimation animation, int duration = 800, int interval = 200) { if (ElementToAnimate.Count() > 1) { await JsRuntime.InvokeVoidAsync("window.animator.animateElements", ElementToAnimate, IFomanticAnimator.ToClass(animation) + " in", duration, interval); } else { await JsRuntime.InvokeVoidAsync("window.animator.animate", ElementToAnimate[0], IFomanticAnimator.ToClass(animation) + " in", duration); } }
public virtual async Task Animate(int interval = 200, params Tuple <StaticAnimation, int>[] animations) { if (ElementToAnimate.Count() > 1) { await JsRuntime.InvokeVoidAsync("window.animator.animateElementsMultible", ElementToAnimate, animations.Select(d => new { animation = IFomanticAnimator.ToClass(d.Item1), duration = d.Item2 }), interval); } else { await JsRuntime.InvokeVoidAsync("window.animator.animateMultible", ElementToAnimate[0], animations.Select(d => new { animation = IFomanticAnimator.ToClass(d.Item1), duration = d.Item2 })); } }