Fix:修复拖拽画布和拖拽调整图片时会选中文字的问题

This commit is contained in:
街角小林
2024-05-31 14:46:21 +08:00
parent 12dae210ef
commit c967be2bc2
2 changed files with 3 additions and 1 deletions

View File

@@ -29,8 +29,9 @@ class View {
this.fit()
})
// 拖动视图
this.mindMap.event.on('mousedown', () => {
this.mindMap.event.on('mousedown', e => {
if (this.mindMap.opt.isDisableDrag) return
e.preventDefault()
this.sx = this.x
this.sy = this.y
})

View File

@@ -154,6 +154,7 @@ class NodeImgAdjust {
})
btnEl.addEventListener('mousedown', e => {
e.stopPropagation()
e.preventDefault()
this.onMousedown(e)
})
btnEl.addEventListener('mouseup', e => {