1
votes

Function not triggered when moving slider to fast. I'm calling function using "slide" with Jquery UI slider. Is there a way to force it to call the function on each step? Here's the code:

var last = currentZoom;
$( "#slider-vertical" ).slider({
    orientation: "vertical",
    range: "min",
    min: 0.2,
    max: 1.3,
    value: currentZoom,
    step: 0.1,
slide: function( event, ui ) {
    if (ui.value > last) {
        zoomIn();
    }else{
        zoomOut();
    }
    console.log($( "#slider-vertical" ).slider('value'));
    last = ui.value;
}
});

So just to recap, while sliding it to fast it doesnt recognize the slide and it leads to it on skipping steps resulting in inaccurate values.

Thanks

I've been unable to replicate the issue. Tested here jsfiddle.net/Twisty/xxLLv3zj - Twisty
Might help to review your zoom functions. Could you include those in your post? - Twisty
@TellJohn did you got any solution for this issue if so kindly share the same,Thanks - BJ Patel