lifegadget / ui-slider

A visually attractive slider for ambitious Ember apps
https://ui-slider.firebaseapp.com/
MIT License
30 stars 39 forks source link

oldValue in changed event is wrong #8

Open pnachum opened 8 years ago

pnachum commented 8 years ago

I'm using the slider with immediateResponse set to true. The arguments passed to the changed event are the new value, and an object containing oldValue, but oldValue is also the new value, instead of the previous value.

yankeeinlondon commented 8 years ago

I'm heads down on other things at the moment but feel free to send me a PR if you need this more urgently. The problem is that this code works fine with only slideStart and slideStop events are modifying the value:

https://github.com/lifegadget/ui-slider/blob/master/addon/components/ui-slider.js#L283-L284

but with immediateResponse you also set the value on the slide event:

https://github.com/lifegadget/ui-slider/blob/master/addon/components/ui-slider.js#L67

Ok, need coffee. I will get to this at some point but just super busy at moment.

pnachum commented 8 years ago

No worries, it's definitely not urgent. Just something I noticed and figured I should bring to your attention.

I can take a look at trying to fix it

yankeeinlondon commented 8 years ago

thanks, will get to it but not this week