Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NumberController

How to use

``` javascript const target = { property: 1 }

// Display an input[type='number'] group.add('property', target)

// Display an input[type='range'] group.add('property', target, { min: -1, max: 1, step: 0.1 })

// Display an input[type='range'] group.add('property', target, { range: true })


For more information about options or events see <a href="BaseController.html">BaseController</a>

Hierarchy

Index

Constructors

Properties

step: number

If not defined step will be calculated automatically based on initial value

min: number

If not defined min will be calculated automatically based on initial value

max: number

If not defined max will be calculated automatically based on initial value

range: boolean

If min or max are defined, range will be equal to true by default

listen: boolean = false

If true, the controller value will be updated automatically if target object is modified. Carefull: heavy use may reduce performance

group.add('someProperty', target, { listen: true })
disabled: boolean = false

If true, the controller will not be editable

name: string

Display name of a controller, defaultly equal to property.

group.add('someProperty', target, { name: 'Custom display name' })
property: string

property controlled in the target object

target: Object

source object in which the property key is defined

parent: BaseGroup

Methods

  • forceUpdate(): void
  • Manually update controller value in the form if target has changed

    Returns void

  • destroy(): void
  • Delete the controller

    Returns void

  • add(property: string, target?: Object, params?: any): void
  • Add a controller in the same Group of current controller

    Parameters

    • property: string
    • target: Object = undefined
    • params: any = undefined

    Returns void

  • valueOf(): any

Generated using TypeDoc