fix prevMove bug
This commit is contained in:
parent
cc93f346ce
commit
c4b28aceec
3956
package-lock.json
generated
3956
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -191,9 +191,11 @@ export class ContentMove {
|
||||
}
|
||||
maxPriority = math.max(maxPriority, nextPrio)
|
||||
// was already moved
|
||||
if (start.moved && !transaction.prevMoved.has(start)) {
|
||||
const prevMove = start.moved
|
||||
if (prevMove && !transaction.prevMoved.has(start) && prevMove.id.clock < (transaction.beforeState.get(prevMove.id.client) || 0)) {
|
||||
// only override prevMoved if the prevMoved item is not new
|
||||
// we need to know which item previously moved an item
|
||||
transaction.prevMoved.set(start, start.moved)
|
||||
transaction.prevMoved.set(start, prevMove)
|
||||
}
|
||||
start.moved = item
|
||||
} else {
|
||||
|
@ -634,6 +634,7 @@ const monitorArrayTestObject = user => {
|
||||
arr.splice(currpos, d.delete)
|
||||
}
|
||||
}
|
||||
t.compare(arr, yarr.toArray())
|
||||
})
|
||||
return arr
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user