This project is read-only.

EaseObjectGroup Complete event

Apr 21, 2011 at 10:17 AM

When the EaseObjectGroup.Complete event fires, not all the EaseObjects have their .IsRunning set to false.

I can see in the source code that the events are fired before the return Stop() - which clears the IsRunning flag.

When  the event fires, I'm looping through my EaseObject array and calling .Start()

Only those with IsRunning set to false restart.

So, tried calling .Stop() method on all EaseObjects before calling start

This didn't work either

Any thoughts?

Many thanks

Did I forget to mention, nice library!

 

 

 

Jun 29, 2013 at 5:51 PM
Thanks, and sorry for the late reply. You're correct, there is a problem in the OnComplete and should be fixed - as mentioned in This thread. And you're correct again that Stop is called AFTER the onComplete... so it needs to be changed.

[ Current ]

EaseObject.Finish
            if (ActiveCount > 0)
            {
                if (Update != null) Update(this, PercentEase);
                if (Complete != null) Complete(this, PercentEase);
            }
            return Stop();
EaseObject.Stop
           foreach (GetterSetterData data in Props.Values) if (data.IsActive) UnRegisterDependencyProperty(data.Name);
[ Potential Fix ]

EaseObject.Finish
            if ((flags & IS_RUNNING) == IS_RUNNING) flags -= IS_RUNNING;

            if (ActiveCount > 0)
            { 
                if (Update != null) Update(this, PercentEase);
                Stop();
                if (Complete != null) Complete(this, PercentEase);
                return this;
            }
            else
            {
                return Stop();
            }
EaseObject.Stop
           foreach (GetterSetterData data in Props.Values) if (data.IsActive)
           {
                    data.IsActive = false;
                    UnRegisterDependencyProperty(data.Name);
            }