* @param {ID} id * @param {Item | null} left * @param {ID | null} origin * @param {Item | null} right * @param {ID | null} rightOrigin * @param {YType|ID|null} parent Is a type if integrated, is null if it is possible to copy parent from left or right, is ID before integration to sear
(id, left, origin, right, rightOrigin, parent, parentSub, content)
| 283 | * @param {AbstractContent} content |
| 284 | */ |
| 285 | constructor (id, left, origin, right, rightOrigin, parent, parentSub, content) { |
| 286 | super(id, content.getLength()) |
| 287 | /** |
| 288 | * The item that was originally to the left of this item. |
| 289 | * @type {ID | null} |
| 290 | */ |
| 291 | this.origin = origin |
| 292 | /** |
| 293 | * The item that is currently to the left of this item. |
| 294 | * @type {Item | null} |
| 295 | */ |
| 296 | this.left = left |
| 297 | /** |
| 298 | * The item that is currently to the right of this item. |
| 299 | * @type {Item | null} |
| 300 | */ |
| 301 | this.right = right |
| 302 | /** |
| 303 | * The item that was originally to the right of this item. |
| 304 | * @type {ID | null} |
| 305 | */ |
| 306 | this.rightOrigin = rightOrigin |
| 307 | /** |
| 308 | * @type {YType|ID|null} |
| 309 | */ |
| 310 | this.parent = parent |
| 311 | /** |
| 312 | * If the parent refers to this item with some kind of key (e.g. YMap, the |
| 313 | * key is specified here. The key is then used to refer to the list in which |
| 314 | * to insert this item. If `parentSub = null` type._start is the list in |
| 315 | * which to insert to. Otherwise it is `parent._map`. |
| 316 | * @type {String | null} |
| 317 | */ |
| 318 | this.parentSub = parentSub |
| 319 | /** |
| 320 | * If this type's effect is redone this type refers to the type that undid |
| 321 | * this operation. |
| 322 | * @type {ID | null} |
| 323 | */ |
| 324 | this.redone = null |
| 325 | /** |
| 326 | * @type {AbstractContent} |
| 327 | */ |
| 328 | this.content = content |
| 329 | /** |
| 330 | * bit1: keep |
| 331 | * bit2: countable |
| 332 | * bit3: deleted |
| 333 | * bit4: mark - mark node as fast-search-marker |
| 334 | * @type {number} byte |
| 335 | */ |
| 336 | this.info = this.content.isCountable() ? binary.BIT2 : 0 |
| 337 | } |
| 338 | |
| 339 | /** |
| 340 | * This is used to mark the item as an indexed fast-search marker |
nothing calls this directly
no test coverage detected