implement some of the commented todos

This commit is contained in:
Kevin Jahns
2019-04-09 04:01:37 +02:00
parent 1b06f59d1c
commit 52ec698635
24 changed files with 233 additions and 243 deletions

View File

@@ -2,7 +2,8 @@
import {
isParentOf,
createID
createID,
transact
} from '../internals.js'
class ReverseOperation {
@@ -33,7 +34,7 @@ class ReverseOperation {
function applyReverseOperation (y, scope, reverseBuffer) {
let performedUndo = false
let undoOp = null
y.transact(() => {
transact(y, () => {
while (!performedUndo && reverseBuffer.length > 0) {
undoOp = reverseBuffer.pop()
// make sure that it is possible to iterate {from}-{to}
@@ -107,7 +108,6 @@ export class UndoManager {
this._lastTransactionWasUndo = false
const y = scope._y
this.y = y
y._hasUndoManager = true
let bindingInfos
y.on('beforeTransaction', (y, transaction, remote) => {
if (!remote) {