Exports method to create a slider_ab element group.

Methods

(inner) numericChecks(value, params) → {Boolean}

The numericChecks method checks whether a provided numeric value is a number, larger than params.min, and smaller than params.max.

The slider_ab numericCheck methods returns false if the 'a' slider element value exceeds the 'b' slider element value or vice versa.

Parameters:
NameTypeDescription
valueObject

The numeric value to check.

paramsObject

The config object argument.

Properties
NameTypeDescription
params.minnumeric

Value must be larger than min.

params.maxnumeric

Value must be smaller than max.

params.showMinMaxboolean

Whether the minmax-row element should be displayed.

params.data_idstring

The id of the numeric input element.

Returns:

true if checks are passed.

Type: 
Boolean

(inner) onRangeInput(e, params)

Assign value from range type input to associated numericInput element.

Formatting and numeric checks will be handled by the numericInput element.

Parameters:
NameTypeDescription
eObject

oninput event from range type input.

paramsObject

params object used to pass additional params to the numericInput input function.

(inner) slider_ab(params) → {HTMLElement}

The slider method creates a range slider element with two numeric input elements [a/b].

The params.value property must be between params.min and params.max params.

Parameters:
NameTypeDescription
paramsObject

Parameter for slider element.

Properties
NameTypeDescription
params.val_anumeric

Parameter value for a input.

params.val_bnumeric

Parameter value for b input.

params.minnumeric

Numeric range min.

params.maxnumeric

Numeric range max.

Returns:

Element group containing range and numeric input elements.

Type: 
HTMLElement