Feat:新增节点标签的点击事件

This commit is contained in:
街角小林 2024-05-08 17:42:29 +08:00
parent b69a0b620d
commit e939b6132f

View File

@ -288,6 +288,9 @@ function createTagNode() {
let nodes = []
tagData.slice(0, this.mindMap.opt.maxTag).forEach((item, index) => {
let tag = new G()
tag.on('click', () => {
this.mindMap.emit('node_tag_click', this, item)
})
// 标签文本
let text = new Text().text(item).x(8).cy(8)
this.style.tagText(text, index)