Closed straps closed 4 years ago
Hi @straps, this functionality is redundant and adds too much code to slider. In fact this method was not included in to original set of methods, because it is super easy to emulate it:
// set this boolean variable to true
let onBegin = true;
...
// in slider config, in onChange callback check if it is true
onChange: function (data) {
if (onBegin) {
onBegin = false;
// this is on begin callaback
}
},
onFinish: function (data) {
// set it back to true
onBegin = true;
}
So, as you see, no need to have this method.
I don't agree because is not so immediate (set a variable named onBegin inside an onFinish???) and I will keep working with my fork, but anyway, thanks for reply.
As you see, let onBegin = true;
was set outside.
In additional to onFinish, I needed and added a callback called when dragging start called onBegin
A tried to respect your code standards, please take a look at it, can be useful to others too , thanks