VisiOmatic web client

Class

Spinbox

Extends
  • leaflet.Evented

new Spinbox(parent, optionsopt) → {Spinbox}

Create a new spinbox widget.

Parameters

  • parent object

    Parent element.

  • options object <optional>

    Options.

    Properties

    • title string <optional>
      'Enter value'

      Title of the control.

    • dmin number <optional>

      Minimum value.

    • dmax number <optional>

      Maximum value.

    • step number <optional>

      Initial value increment between autorepeat updates.

    • initValue number <optional>

      Initial value.

    • repButton boolean <optional>
      true

      Up/Down spin buttons have autorepeat?

    • instantUpdate boolean <optional>
      false

      Return updated value at each autorepeat update?

    • className string <optional>

      Element class name for the widget.

Returns

  • Spinbox

    Spinbox widget element.

Source

Methods

privatestatic

_offset(target, direction)

Increment or decrement spinbox value.

Parameters

  • target object

    Element that triggered the action.

  • direction number

    Step direction (-1 or +1).

Source

privatestatic

_prec(step) → {number}

Set spinbox value precision.

Parameters

  • step number

    Increment value.

Returns

  • number

    Number of decimals.

Source

static

step(valopt) → {number}

Return or set the current increment value of the spinbox.

Parameters

  • val number <optional>

    If provided, set the spinbox increment value to that of val.

Returns

  • number

    Spinbox increment value.

Source

static

value(valopt) → {number}

Return or set the current value of the spinbox.

Parameters

  • val number <optional>

    If provided, set the spinbox value to that of val.

Returns

  • number

    Spinbox value.

Source