I’ve looked through the forum and have seen some others shed light on this but it still does not address the fundamental problem.
If a user is currently dragging the slider pointer I do not want to be blasted with numerous ‘onChange’ events when I am only concerned about the final landing value.
If I add the ‘if this._busy’ code to my onChange handler, then I lose the ability to simply click on the slider and get the new value. I must click on the pointer a second time and then I get a proper event sent to me.
How can I write an ‘onChange’ handler that allows me to ignore the transient events during a user drag event? -AND- Also allows for single direct clicks on the slider to be detected …
Try onSlideEdn event handler
docs.dhtmlx.com/doku.php?id=dhtm … slideend&s=onslideend
If it doesn’t hepl, provide us completed demo - we will try to help you
Yes. I am using onSlideEnd() as well. That is the event that gets called when using the _busy check.
When you click on the bar at some random location the pointer moves to that location. The _busy check stops the onChange() event from firing. When you click the pointer at that location a second time the onSlideEnd() event gets fired.
There should be a way to click once on the bar and get an onChange() event. Then while sliding the pointer (drag in progress) there should be the ability to ignore the onChange() event.
Right now that combination is not possible.
To get slider value by first click you can use setOnChangeHandler method
Try the next:
Hi to all
please try attached demo
if I correctly understood, should be:
- while move - onChange + onSlideEnd on mouseup
- when simple click w/o move somewhere outside pen - onChnage + onSlideEnd
- when simple click w/o move on pen - onSlideEnd only
12.ZIP (53.1 KB)