antvis / X6

🚀 JavaScript diagramming library that uses SVG and HTML for rendering.
https://x6.antv.antgroup.com
MIT License
5.64k stars 1.69k forks source link

2.x:edge的target-arrowhead、edge-editor两个tool冲突 #3559

Closed JamesTing closed 1 year ago

JamesTing commented 1 year ago

问题描述

edge的target-arrowhead(source-arrowhead)、edge-editor两个tool冲突。当target-arrowhead存在时,出现两个问题:

  1. 必现:双击edge-editor,getText为空。
  2. 偶现,找不到规律:编辑edge-editor的label,X6会清除edge上的所有label,只保留二次编辑的label。

重现链接

https://codesandbox.io/s/bold-meninsky-65tjs9?file=/index.ts

重现步骤

  1. 创建edge时,设定tools属性为 edge-editor
  2. 点击edge时,添加tools source-arrowhead、target-arrowhead(这两个tool在创建edge时在tools种设定似乎无效)
  3. 双击edge,输入label A
  4. 双击label A,此时输入框内无法获取之前的文本

预期行为

我期望:双击label A,可以继续编辑之前的文本 我看到:双击label A,编辑框内为空

平台

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

jennyxu520 commented 1 year ago

我跟你的类似,我是vertices和edge-editor冲突,愁死。。。https://codesandbox.io/s/pedantic-galileo-r93r9b?file=/src/index.ts

JamesTing commented 1 year ago

🙏特别感谢,这个问题已经被解决了 @NewByVector 👍

x6-bot[bot] commented 4 months ago

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.