Feat:存在激活节点时点击关联线可直接激活关联线
This commit is contained in:
parent
73e7855575
commit
c0ad18cff8
@ -257,9 +257,7 @@ class AssociativeLine {
|
|||||||
}) {
|
}) {
|
||||||
let { associativeLineActiveColor } = this.mindMap.themeConfig
|
let { associativeLineActiveColor } = this.mindMap.themeConfig
|
||||||
// 如果当前存在激活节点,那么取消激活节点
|
// 如果当前存在激活节点,那么取消激活节点
|
||||||
if (this.mindMap.renderer.activeNodeList.length > 0) {
|
this.mindMap.execCommand('CLEAR_ACTIVE_NODE')
|
||||||
this.clearActiveNodes()
|
|
||||||
} else {
|
|
||||||
// 否则清除当前的关联线的激活状态,如果有的话
|
// 否则清除当前的关联线的激活状态,如果有的话
|
||||||
this.clearActiveLine()
|
this.clearActiveLine()
|
||||||
// 保存当前激活的关联线信息
|
// 保存当前激活的关联线信息
|
||||||
@ -279,7 +277,6 @@ class AssociativeLine {
|
|||||||
)
|
)
|
||||||
this.mindMap.emit('associative_line_click', path, clickPath, node, toNode)
|
this.mindMap.emit('associative_line_click', path, clickPath, node, toNode)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 移除所有连接线
|
// 移除所有连接线
|
||||||
removeAllLines() {
|
removeAllLines() {
|
||||||
@ -488,13 +485,6 @@ class AssociativeLine {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清除当前激活的节点
|
|
||||||
clearActiveNodes() {
|
|
||||||
if (this.mindMap.renderer.activeNodeList.length > 0) {
|
|
||||||
this.mindMap.execCommand('CLEAR_ACTIVE_NODE')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清除激活的线
|
// 清除激活的线
|
||||||
clearActiveLine() {
|
clearActiveLine() {
|
||||||
if (this.activeLine) {
|
if (this.activeLine) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user