fix slider mousewheel action
This commit is contained in:
parent
cd2da582c4
commit
944e9df7cc
@ -1931,11 +1931,10 @@ function initSliders() {
|
|||||||
if (!$slider.attr('step')) return;
|
if (!$slider.attr('step')) return;
|
||||||
var val = Number($slider.val());
|
var val = Number($slider.val());
|
||||||
var step = Number($slider.attr('step'));
|
var step = Number($slider.attr('step'));
|
||||||
if (ev.originalEvent.wheelDelta < 0) {
|
if (ev.originalEvent.deltaY > 0) {
|
||||||
step *= -1;
|
step *= -1;
|
||||||
}
|
}
|
||||||
val += step;
|
$slider.val(val + step);
|
||||||
$slider.val(val + (ev.originalEvent.wheelDelta > 0 ? 1 : -1));
|
|
||||||
$slider.trigger('change');
|
$slider.trigger('change');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user