Fix:修复只读模式实例化后再切换为编辑模式时没有将当前数据入栈的问题
This commit is contained in:
parent
74d302639a
commit
53c2af0bc0
@ -491,6 +491,10 @@ class MindMap {
|
|||||||
this.execCommand('CLEAR_ACTIVE_NODE')
|
this.execCommand('CLEAR_ACTIVE_NODE')
|
||||||
}
|
}
|
||||||
this.opt.readonly = isReadonly
|
this.opt.readonly = isReadonly
|
||||||
|
// 切换为编辑模式时,如果历史记录堆栈是空的,那么进行一次入栈操作
|
||||||
|
if (!isReadonly && this.command.history.length <= 0) {
|
||||||
|
this.command.originAddHistory()
|
||||||
|
}
|
||||||
this.emit('mode_change', mode)
|
this.emit('mode_change', mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user