This project is archived and is in readonly mode.

#951 ✓duplicate

Slider this.step bad initialisation

Reported by Mogzor | July 23rd, 2010 @ 10:27 AM


As there is currently no getValue() on Slider, I used to use this.step to check the current value of the slider outside of onChange and onComplete events.

Recently I used 24 sliders to pick values for each hour of the day in a convenient manner, and found myself in trouble when I wanted to check all the sliders values through this.step since some were set to -1 while my initialStep was 100, thus not reflecting the "real value".

I fixed the initialisation with :
this.previousChange = this.previousEnd = this.step = this.options.initialStep;

Since this option already has a default value, it doesn't break anything.

So now it's fine, but I thought it'd be fine to have it upstream too.



Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins