0

I made this example so you can reproduce the error:

I put some labels on top of each handle so you can see the value while moving the handles, the problem is that sometimes it behaves in a strange manner, for example if you drag one handle, say the one with the label 15, and you start moving it left and right, you will notice that sometimes when you drag to the left it adds 5 points(instead of substracting), and this behavior is the same for all handles.

I'm pretty much stuck here, and my UI wouldn't work with this bug on it :(

Thanks in advance.

1

1 Answer 1

2

Its not adding points, the sliderlabel gets triggered after you start sliding, so the first time you slide the function isnt triggered only the second time.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for your answer, but I'm not sure I understand what you mean. The updateLabel function gets called on the slider slide event, and it updates all the labels on the slider each time. I just tried debugging it, and the function gets called every time.
I managed to fix it: jsfiddle.net/BxY99/258, the exact problem was that I was updating the UI with the values that had not been yet updated by the slide function. I modified the example so the function grabs the values from the callback function parameter ui. Your answer pointed me on the right direction. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.