Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

setLimits()

Karl edited this page Apr 18, 2018 · 10 revisions

Quickly sets the limits for the handles.

The instance will automatically set the value to within the limits should the current one be outside of them.

Single

Pass an object with the min and/or max properties to set the limits for the handle.

slider.setLimits({
    min: 10,
    max: 90
});

Double

Pass an array of objects (one for each handle) with the min and/or max properties to set the limits for the handle.

slider.setLimits([
    {
        min: 10,
        max: 40
    }, {
        min: 60,
        max: 90
    },
]);
Clone this wiki locally