mikoskinen / Blazor.Animate

Easily add fade, slide and zoom-effects into your Blazor applications.
MIT License
282 stars 36 forks source link

Delay doesn't seem to do anything #21

Open PaulSinnema opened 3 years ago

PaulSinnema commented 3 years ago

Tried to get this working with Delay but the animation start immediatly. Also tried using Blasorise implementation. Same issue.

Tried it with DelayMs = "5000" with Delay=@TimeSpan.FromSeconds(5). Same issue.

Solved it like this but it's not nice:

<Animate Animation="Animations.FadeIn"
         DurationMs="1000"
         @ref=@UnAuthorizedAnimation
         IsManual="true">
    <h3>UnAuthorizedDisplay</h3>
</Animate>
using BlazorAnimate;
using System.Threading.Tasks;

namespace Wur.GroupTool.Blazor.Shared
{
    public partial class UnAuthorizedDisplay
    {
        private Animate UnAuthorizedAnimation;

        protected override async void OnInitialized()
        {
            await Task.Delay(5000);

            UnAuthorizedAnimation.Run();

            base.OnInitialized();
        }
    }
}
mrcameron999 commented 3 years ago

having the same issue. I think its broken

gabrieldelaparra commented 1 year ago

Delays <= 900 do work. I have not reviewed the code, but hope that this helps.