ve.List

ve.Component. ve.List

Refer to ve.Component for methods or fields inherited from this Component's parent such as .options.attributes or .element.

Generic horizontal list input for non-nested lists with reorderable elements, i.e. arrays.

  • Functional binding: veList().
Constructor:
  • arg0_value: Array<ve.Component>
  • arg1_options: Object
    • .do_not_allow_insertion=false: boolean
    • .do_not_display_info_button=false: boolean
    • .max: number - The maximum number of elements in the array.
    • .min=0: number - The minimum number of elements in the array.
    • .ondelete: function(arg0_component_obj:ve.Component)
    • .options: Object - The .options field to pass onto elements in the array.
    • .placeholder: ve.Component - An instance used as a template for new items. Required if initialising with an empty array.
    • .split_rows=true: boolean - Whether to split item rows onto separate lines.
Instance:

Constructor

new ve.List()

Source:

Extends

Members

v :Array.<ve.Component>

Returns the current array value.

  • Accessor of: ve.List
Source:
Type:

v

Sets the current array value.

  • Accessor of: ve.List
Source:

from_binding

Internal .from_binding setter for handling .options.from_binding. Accepts a string literal that is then parsed to a variable reference.

.to_binding counterparts are manually handled child-side.

Overrides:
Source:

limit

Tests the current this.limit by calling this.limit_function(this.v, this). Otherwise resolves to true if no .options.limit is set.

Overrides:
Source:

name

Returns the visual name of the present ve.Component,

Overrides:
Source:

Methods

addItem()

Adds an item to the end of the array.

  • Method of: ve.List
Source:

deleteItem(arg0_index)

Deletes an item from the array given its index.

  • Method of: ve.List
Source:
Parameters:
Name Type Description
arg0_index number

draw()

Redraws the present array.

  • Method of: ve.List
Source:

addComponent()

Adds the current component to this.parent_el should it exist.

Overrides:
Source:

bind(arg0_container_el)

Manually binds/mounts the present ve.Component into the visual DOM.

Overrides:
Source:
Parameters:
Name Type Description
arg0_container_el HTMLElement

fireFromBinding()

Pseudo-setter from binding. Fires only upon program-driven changes to .v directly, which means that this has to be monitored manually component-side in set v(). This should always come last in set v().

Overrides:
Source:

fireToBinding()

Pseudo-setter to binding. Fires only upon user-driven changes, which means that this has to be monitored manually component-side.

Overrides:
Source:

remove()

Removes the component/element from the DOM.

Overrides:
Source:

removeComponent()

Removes the current component from this.parent_el should it exist.

Overrides:
Source:

setOwner(arg0_value, arg1_owner_array)

Sets the root parent and ownership tree. Influences this.parent_el, this.owner, this.owners.

Overrides:
Source:
Parameters:
Name Type Description
arg0_value
arg1_owner_array

setValueFromObject(arg0_object, arg1_object)

Destructures Object values and transfers them into the .v instance fields of each Vercengen component.

Overrides:
Source:
Parameters:
Name Type Description
arg0_object Object

The Vercengen object to transfer to.

arg1_object Object

The other object to transfer from.