Fix:修复多选节点时在节点上松开鼠标时框选区域不会消失的问题
This commit is contained in:
parent
b959e90723
commit
83a5ef8e2e
@ -89,23 +89,28 @@ class Select {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
this.mindMap.on('mouseup', () => {
|
this.onMouseup = this.onMouseup.bind(this)
|
||||||
if (this.mindMap.opt.readonly) {
|
this.mindMap.on('mouseup', this.onMouseup)
|
||||||
return
|
this.mindMap.on('node_mouseup', this.onMouseup)
|
||||||
}
|
}
|
||||||
if (!this.isMousedown) {
|
|
||||||
return
|
// 结束框选
|
||||||
}
|
onMouseup() {
|
||||||
this.checkTriggerNodeActiveEvent()
|
if (this.mindMap.opt.readonly) {
|
||||||
clearTimeout(this.autoMoveTimer)
|
return
|
||||||
this.isMousedown = false
|
}
|
||||||
this.cacheActiveList = []
|
if (!this.isMousedown) {
|
||||||
if (this.rect) this.rect.remove()
|
return
|
||||||
this.rect = null
|
}
|
||||||
setTimeout(() => {
|
this.checkTriggerNodeActiveEvent()
|
||||||
this.isSelecting = false
|
clearTimeout(this.autoMoveTimer)
|
||||||
}, 0)
|
this.isMousedown = false
|
||||||
})
|
this.cacheActiveList = []
|
||||||
|
if (this.rect) this.rect.remove()
|
||||||
|
this.rect = null
|
||||||
|
setTimeout(() => {
|
||||||
|
this.isSelecting = false
|
||||||
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果激活节点改变了,那么触发事件
|
// 如果激活节点改变了,那么触发事件
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user