Skip to main content

onSliderValueChanged

@combeenation/custom-code-utils


Variable: onSliderValueChanged()

const onSliderValueChanged: (ctrlName, callback, onSliding, throttleMS?) => void = CtrlValueChanged.onSliderValueChanged

Function for assigning a callback to slider value changes.
It can be configured whether the callback should be executed on each change or just when the final slider position is reached.
Furthermore a throttling time can be configured, so that the amount of callback executions will be limited.

Parameters

ctrlName

string

callback

(value, ctrl) => void

onSliding

boolean = false

true: execute callback on each change, false: execute callback when slider movement is finished

throttleMS?

number

Makes sure that the callback function is not executed multiple times within this time, only takes effect if onSliding is true.\

  • 0: no throttling\
  • > 0: throttling with the defined time in milliseconds\
  • undefined: use default throttling time from slider control

Returns

void