antvis/G6

自定义节点afterDraw增加文字之后,点击文字无法拖动节点 #5100

guan-xiong posted onGitHub

问题描述

自定义节点afterDraw增加文字之后,点击文字无法拖动节点

重现链接

https://stackblitz.com/edit/vue-rmvcjt?file=src%2Fcomponents%2FHelloWorld.vue

重现步骤

点击文字拖动节点

预期行为

节点随着鼠标移动

平台

  • 操作系统: Windows
  • 网页浏览器: edge
  • G6 版本: 4.8.22

屏幕截图或视频(可选)

https://github.com/antvis/G6/assets/72587782/fa2d94d5-6c65-488e-8a33-f14de010a5c8

补充说明(可选)

No response


hi @guan-xiong, welcome!

posted by github-actions[bot] over 1 year ago

demo 无法运行呢。如果是额外 addShape 添加的图形无法触发被拖拽事件的问题的话,需要给图形加上 draggable: true ,和 attrs 平级

posted by Yanyan-Wang over 1 year ago

谢谢~已解决。

demo 无法运行呢。如果是额外 addShape 添加的图形无法触发被拖拽事件的问题的话,需要给图形加上 draggable: true ,和 attrs 平级

posted by guan-xiong over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests