rad-gui
    Preparing search index...

    NumberControl Control for numerical values with optional slider, step, and range constraints

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • parent: any
      • object: Record<string, any>
      • property: string
      • Optionalmin: number
      • Optionalmax: number
      • Optionalstep: number

      Returns NumberControl

    Properties

    _changed: boolean = false

    Whether the value has changed since the last finishChange event

    _decimals: number
    _disabled: boolean = false

    Whether the controller is disabled

    _hasSlider: boolean
    _hidden: boolean = false

    Whether the controller is hidden

    _inputFocused: boolean
    _listenCallbackID: any

    ID of the animation frame when listening for changes

    _listening: boolean = false

    Whether the controller is actively listening for external changes

    _listenPrevValue: any

    Previous value when listening for changes

    _max: number
    _min: number
    _name: any

    Name of the controller (typically matches the property name)

    _onChange: any

    Callback for when the value changes

    _onFinishChange: any

    Callback for when value changes are completed

    _step: number
    _stepExplicit: boolean
    $elForDisable: any

    DOM element that will be disabled when controller is disabled

    $fill: HTMLDivElement
    $input: HTMLInputElement
    $name: HTMLDivElement

    DOM element for displaying the property name

    $slider: HTMLDivElement
    $widget: HTMLDivElement

    DOM element containing the control widget

    decimals: (decimals: number) => this = ...

    Type declaration

      • (decimals: number): this
      • Sets the number of decimal places (implemented by subclasses)

        Parameters

        • decimals: number

          Number of decimal places

        Returns this

        This controller instance (for chaining)

    domElement: HTMLElement

    Main DOM element for this controller

    initialValue: any

    Initial value of the controlled property

    max: (max: number) => this = ...

    Type declaration

      • (max: number): this
      • Sets the maximum value (implemented by subclasses)

        Parameters

        • max: number

          Maximum value

        Returns this

        This controller instance (for chaining)

    min: (min: number) => this = ...

    Type declaration

      • (min: number): this
      • Sets the minimum value (implemented by subclasses)

        Parameters

        • min: number

          Minimum value

        Returns this

        This controller instance (for chaining)

    object: any

    Object containing the property to control

    parent: any

    Parent GUI instance

    property: any

    Property name being controlled

    step: (step: number, explicit?: boolean) => this = ...

    Type declaration

      • (step: number, explicit?: boolean): this
      • Sets the step size (implemented by subclasses)

        Parameters

        • step: number

          Step size

        • explicit: boolean = true

        Returns this

        This controller instance (for chaining)

    nextNameID: any

    Used for generating unique IDs

    Accessors

    Methods

    • Replaces this controller with an options controller

      Parameters

      • options: any

        Option values for the new controller

      Returns any

      The new options controller

    • Sets the number of decimal places (implemented by subclasses)

      Parameters

      • decimals: number

        Number of decimal places

      Returns this

      This controller instance (for chaining)

    • Sets the step size (implemented by subclasses)

      Parameters

      • step: number

        Step size

      • explicit: boolean = true

      Returns this

      This controller instance (for chaining)