Expand all

ve.dm.MetaList

Constructor

new ve.dm.MetaList(doc) #

DataModel meta list.

Parameters:

Name Type Description
doc ve.dm.Document

Document model

Mixes in:
Source:
DataModel meta list.

Methods

getItems() → {Array.<ve.dm.MetaItem>} #

Get all items in the list.

This function returns a shallow copy, so the array isn't returned by reference but the items themselves are.

Source:

Returns:

Array of items in the list

Type
Array.<ve.dm.MetaItem>
Get all items in the list.

getItemsInGroup(group) → {Array.<ve.dm.MetaItem>} #

Get all items in a group.

This function returns a shallow copy, so the array isn't returned by reference but the items themselves are.

Parameters:

Name Type Description
group string
Source:

Returns:

Array of items in the group (shallow copy)

Type
Array.<ve.dm.MetaItem>
Get all items in a group.

onNodeAttached(node) #

If a ve.dm.MetaItem was attached, insert it into items in document order

Parameters:

Name Type Description
node ve.dm.Node

The node that was attached

Source:
If a ve.dm.MetaItem was attached, insert it into items in document order

onNodeDetached(node) #

If a ve.dm.MetaItem was detached, remove it from items

Parameters:

Name Type Description
node ve.dm.Node

The node that was detached

Source:
If a ve.dm.MetaItem was detached, remove it from items

Events

insert(item) #

Parameters:

Name Type Description
item ve.dm.MetaItem

Item that was inserted

Source:

remove(item) #

Parameters:

Name Type Description
item ve.dm.MetaItem

Item that was removed

Source: