mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-23 19:37:44 +08:00
Feat:支持从思维导图实例上读取结构类
This commit is contained in:
parent
9661aa55c5
commit
3b10b2b229
@ -117,11 +117,12 @@ class Render {
|
||||
// 设置布局结构
|
||||
setLayout() {
|
||||
const { layout } = this.mindMap.opt
|
||||
this.layout = new (
|
||||
layouts[layout]
|
||||
? layouts[layout]
|
||||
: layouts[CONSTANTS.LAYOUT.LOGICAL_STRUCTURE]
|
||||
)(this, layout)
|
||||
let L = layouts[layout] || this.mindMap[layout]
|
||||
if (!L) {
|
||||
L = layouts[CONSTANTS.LAYOUT.LOGICAL_STRUCTURE]
|
||||
this.mindMap.opt.layout = CONSTANTS.LAYOUT.LOGICAL_STRUCTURE
|
||||
}
|
||||
this.layout = new L(this, layout)
|
||||
}
|
||||
|
||||
// 重新设置思维导图数据
|
||||
|
||||
Loading…
Reference in New Issue
Block a user