Class

API ReferenceRendererClass

Source


Class.New()

Static method of
Class
Parameters
  • component — Componentoptional
  • options — Objectoptional
Returns
Renderer.Class

Source


constructor()

Extends
Renderer.Extension
Returns
Class

Source


name

Type
String

This property is used in the Item::classes list to identify various classes.


onNameChange()

Parameters
  • oldValue — String
Type
Signal

Source


target

Type
Item

Reference to the Item on which this class has effects.

If state is created inside the Item, this property is set automatically.


onTargetChange()

Parameters
  • oldValue — Item
Type
Signal

Source


changes

Type
Object

This objects contains all properties to change on the target item.

It accepts bindings and listeners as well.

Source


priority

Type
Integer
Default
0

onPriorityChange()

Parameters
  • oldValue — Integer
Type
Signal

Source


when

Type
Boolean

Indicates whether the class is active or not.

When it's true, this state is appended on the end of the Item::classes list.

Mostly used with bindings.

Grid {
    columns: 2
    // reduce to one column if the view width is lower than 500 pixels
    Class {
        when: view.width < 500
        changes: {
            columns: 1
        }
    }
}

onWhenChange()

Parameters
  • oldValue — Boolean
Type
Signal

Source


children

Type
Object

Source


children.length

Type
Integer
Default
0

Source


children.append()

Parameters
  • value — Object
Returns
Object

Source


children.pop()

Parameters
  • index — Integer
Returns
Object

Source


document

Type
Object

Source


onDocumentChange()

Parameters
  • document — Object
Type
Signal

Source


document.onNodeAdd()

Parameters
  • node — Element
Type
Signal

Source


document.onNodeRemove()

Parameters
  • node — Element
Type
Signal

Source


document.query

Type
String

document.onQueryChange()

Parameters
  • oldValue — String
Type
Signal

Source


classes

Type
List

Classes at the end of the list have the highest priority.

This property has a setter, which accepts a string and an array of strings.


onClassesChange()

Parameters
  • added — String
  • removed — String
Type
Signal

Source

results matching ""

    No results matching ""