new AbstractItem(id, left, origin, right, rightOrigin, parent, parentSub)
Parameters:
| Name | Type | Description |
|---|---|---|
id |
ID | |
left |
AbstractItem | null | |
origin |
ID | null | |
right |
AbstractItem | null | |
rightOrigin |
ID | null | |
parent |
AbstractType.<any> | |
parentSub |
string | null |
Members
-
countable
-
Should return false if this Item is some kind of meta information (e.g. format information).
- Whether this Item should be addressable via
yarray.get(i) - Whether this Item should be counted when computing yarray.length
- Whether this Item should be addressable via
-
deleted :Boolean
-
Whether this item was deleted or not.
-
lastId
-
Computes the last content address of this Item.
-
left :AbstractItem|null
-
The item that is currently to the left of this item.
-
length
-
Computes the length of this Item.
-
readonly origin :ID|null
-
The item that was originally to the left of this item.
-
readonly parent :AbstractType.<any>
-
The parent type.
-
readonly parentSub :String|null
-
If the parent refers to this item with some kind of key (e.g. YMap, the key is specified here. The key is then used to refer to the list in which to insert this item. If
parentSub = nulltype._start is the list in which to insert to. Otherwise it isparent._map. -
redone :AbstractItem|null
-
If this type's effect is reundone this type refers to the type that undid this operation.
-
right :AbstractItem|null
-
The item that is currently to the right of this item.
-
readonly rightOrigin :ID|null
-
The item that was originally to the right of this item.
Methods
-
delete(transaction)
-
Mark this Item as deleted.
Parameters:
Name Type Description transactionTransaction -
getContent() → {Array.<any>}
-
Returns:
Array.<any>