Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SliderViewModel

Hierarchy

Index

Properties

declaredClass

declaredClass: string

destroyed

destroyed: boolean

initialized

initialized: boolean

inputFormatFunction

inputFormatFunction: SliderLabelFormatter

A function used to format user inputs.

Read more...

inputParseFunction

inputParseFunction: InputParser

Function used to parse slider inputs formatted by the inputFormatFunction.

Read more...

labelFormatFunction

labelFormatFunction: SliderLabelFormatter

A function used to format labels.

Read more...

Readonly labels

labels: string[]

An array of strings associated with values generated using an internal label formatter or the values returned from labelFormatFunction.

Read more...

max

max: number

The maximum possible data/thumb value of the slider.

Read more...

min

min: number

The minimum possible data/thumb value of the slider.

Read more...

precision

precision: number

Defines how slider values should be rounded.

Read more...

Readonly state

state: "disabled" | "ready"

The state of the view model.

Read more...

thumbsConstrained

thumbsConstrained: boolean

When false, the user can freely move any slider thumb to any position along the track.

Read more...

values

values: number[]

An array of numbers representing absolute thumb positions on the slider.

Read more...

Methods

Protected _get

  • _get(propertyName: string): any
  • _get<T>(propertyName: string): T
  • Parameters

    • propertyName: string

    Returns any

  • Type parameters

    • T

    Parameters

    • propertyName: string

    Returns T

Protected _set

  • Type parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns SliderViewModel

defaultInputFormatFunction

  • defaultInputFormatFunction(value: number): string
  • The default input format function available for use as a fallback in custom formatting implementations.

    Read more...

    Parameters

    • value: number

    Returns string

defaultInputParseFunction

  • defaultInputParseFunction(value: string): number
  • The default input parsing function available for use as a fallback in custom parsing implementations.

    Read more...

    Parameters

    • value: string

    Returns number

defaultLabelFormatFunction

  • defaultLabelFormatFunction(value: number): string
  • The default label format function, available for use as a fallback in custom formatting implementations.

    Read more...

    Parameters

    • value: number

    Returns string

destroy

  • destroy(): void
  • Returns void

emit

  • emit(type: string, event?: any): boolean
  • Emits an event on the instance.

    Read more...

    Parameters

    • type: string
    • Optional event: any

    Returns boolean

get

  • get<T>(propertyName: string): T
  • get(propertyName: string): any
  • Type parameters

    • T

    Parameters

    • propertyName: string

    Returns T

  • Parameters

    • propertyName: string

    Returns any

getBoundsForValueAtIndex

  • getBoundsForValueAtIndex(index: number): any
  • Returns the min and max bounds for a 'value' at the provided index.

    Read more...

    Parameters

    • index: number

    Returns any

getLabelForValue

  • getLabelForValue(value: number, type?: "min" | "max" | "tick" | "values", index?: number): string
  • Returns the formatted label for a provided value.

    Read more...

    Parameters

    • value: number
    • Optional type: "min" | "max" | "tick" | "values"
    • Optional index: number

    Returns string

hasEventListener

  • hasEventListener(type: string): boolean
  • Indicates whether there is an event listener on the instance that matches the provided event name.

    Read more...

    Parameters

    • type: string

    Returns boolean

Protected notifyChange

  • notifyChange(propertyName: string): void
  • Parameters

    • propertyName: string

    Returns void

on

set

  • Type parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns SliderViewModel

  • Parameters

    Returns SliderViewModel

setValue

  • setValue(index: number, value: number): void
  • Updates a thumb value based on the provided index.

    Read more...

    Parameters

    • index: number
    • value: number

    Returns void

toPrecision

  • toPrecision(value: number): string
  • Rounds the given value to the number of decimal places specified in the precision property set on the view model.

    Read more...

    Parameters

    • value: number

    Returns string

watch

  • Parameters

    • path: string | string[]
    • callback: WatchCallback
    • Optional sync: boolean

    Returns WatchHandle

Generated using TypeDoc