Skip to content

Commit 50bcab0

Browse files
committed
Fix: 阻止了Block中的文字被选中
1 parent ede3a79 commit 50bcab0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/vf/flowgraph/block.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class Block extends ElementBase<{
5656
text.setAttribute('font-family', i.font)
5757
text.setAttribute('font-size', i.size + 'px')
5858
text.setAttribute('fill', i.color.hex())
59+
text.style.userSelect = 'none'
5960
appendChild(this, text)
6061
this.text_el.push(text)
6162
}

src/vf/type/line.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Line {
3838
this.el.setAttribute('fill', 'none')
3939
appendChild(flowgraph.el, this)
4040

41-
this.el.addEventListener('click', () => {
41+
this.el.addEventListener('dblclick', () => {
4242
line_pool.remove_line(this)
4343
this.destructor()
4444
})

0 commit comments

Comments
 (0)