Compare origin ids in item.integrate

This commit is contained in:
Kevin Jahns
2019-04-06 15:55:20 +02:00
parent 1b17b5e400
commit c635963747
5 changed files with 36 additions and 9 deletions

View File

@@ -14,6 +14,7 @@ import {
GC,
splitItem,
compareIDs,
addToDeleteSet,
StructStore, Transaction, ID, AbstractType // eslint-disable-line
} from '../internals.js'
@@ -53,6 +54,13 @@ export class ItemDeleted extends AbstractItem {
copy (id, left, origin, right, rightOrigin, parent, parentSub) {
return new ItemDeleted(id, left, origin, right, rightOrigin, parent, parentSub, this.length)
}
/**
* @param {Transaction} transaction
*/
integrate (transaction) {
super.integrate(transaction)
addToDeleteSet(transaction.deleteSet, this.id, this.length)
}
/**
* @param {StructStore} store
* @param {number} diff