fix undo-redo

This commit is contained in:
Kevin Jahns
2018-01-30 15:51:54 -08:00
parent a81a2cd553
commit 5d3922cb64
8 changed files with 40 additions and 30 deletions

View File

@@ -55,14 +55,16 @@ export default class Item {
/**
* Copy the effect of struct
*/
_copy () {
_copy (undeleteChildren, copyPosition) {
let struct = new this.constructor()
struct._origin = this._left
struct._left = this._left
struct._right = this
struct._right_origin = this
struct._parent = this._parent
struct._parentSub = this._parentSub
if (copyPosition) {
struct._origin = this._left
struct._left = this._left
struct._right = this
struct._right_origin = this
struct._parent = this._parent
struct._parentSub = this._parentSub
}
return struct
}
get _lastId () {