Feature:按住根节点也可以拖动画布

This commit is contained in:
wanglin2 2023-03-17 17:03:56 +08:00
parent c8f938dd3e
commit 6ecb97e4e5
5 changed files with 10 additions and 6 deletions

View File

@ -672,11 +672,15 @@ class Node {
this.active(e)
})
this.group.on('mousedown', e => {
e.stopPropagation()
if (!this.isRoot) {
e.stopPropagation()
}
this.mindMap.emit('node_mousedown', this, e)
})
this.group.on('mouseup', e => {
e.stopPropagation()
if (!this.isRoot) {
e.stopPropagation()
}
this.mindMap.emit('node_mouseup', this, e)
})
this.group.on('mouseenter', e => {

View File

@ -2,7 +2,7 @@
## 0.4.5
New: Supports associative lines.
New: 1.Supports associative lines. 2.You can also drag the canvas by holding down the root node.
## 0.4.4

View File

@ -2,7 +2,7 @@
<div>
<h1>Changelog</h1>
<h2>0.4.5</h2>
<p>New: Supports associative lines.</p>
<p>New: 1.Supports associative lines. 2.You can also drag the canvas by holding down the root node.</p>
<h2>0.4.4</h2>
<p>New: Support horizontal scrolling in response to the mouse.</p>
<h2>0.4.3</h2>

View File

@ -2,7 +2,7 @@
## 0.4.5
新增:支持关联线。
新增:1.支持关联线。 2.按住根节点也可以拖动画布。
## 0.4.4

View File

@ -2,7 +2,7 @@
<div>
<h1>Changelog</h1>
<h2>0.4.5</h2>
<p>新增支持关联线</p>
<p>新增1.支持关联线 2.按住根节点也可以拖动画布</p>
<h2>0.4.4</h2>
<p>新增支持响应鼠标的横向滚动</p>
<h2>0.4.3</h2>