How do we know a damping of an element is finished?

In this example, ZIM BITS - Damping and Easing for JavaScript HTML 5 Canvas and CreateJS - Tips, Techniques and Tutorials, how can we know if a specifc damping is completed?

In dragging with slide (or with a Window) we provide a slidestop event. We have not with the Slider. So that is something that perhaps we should add in ZIM 017. Will put it on the list. Basically, what we do for that is in an interval or Ticker, we test to see if the value has changed with respect to a saved value. If not then we dispatch a slidestop event. So something like:

let lastValue=-1000000;
interval(.1, ()=>{
   if (slider.currentValue==lastValue) {
      zog("stopped");
     lastValue = slider.currentValue;
   }
});

Or something like that. It can be a little tricky - because you only want to do this once so you have to also test to see if the value is different and if so then you can start testing to see if the value is the same. I have to race to a party! Sorry.

Will do some testing. Thank you! And have a great party!