MauriceConrad / Photon

Clone native desktop UI's like cocoa and develop native feeling applications using web technologies

Home Page:https://mauriceconrad.github.io/Photon/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slider bug when changing value

3lwan opened this issue · comments

commented

I am binding the slider to a variable using angularjs. When I change the value the slider's position change correctly, howere the colour is not updated as shown in the image.
2017-12-13 13_45_19-display-objects-side-panel html

Am i missing something or is it a bug?
Thanks

@3lwan Thanks for this point!

I didn't saw this use case and therefore there was no solution but now I've implemented a solution ;-)
It didn't worked before because the sliderVisualCalc() method was only called when an "input" event fires but not when the value of the slider changes (Which is the way Angular works). Now I added a special handle for the [Setter] of each Input type range element that fires the sliderVisualCalc every time the value changes.

Look at the new code :)

commented

Awesome, Good job 👍 and thanks for the quick reply as well.