G6 icon indicating copy to clipboard operation
G6 copied to clipboard

react 组件方式自定义节点如何设置连线的anchorPoints?

Open asevenm opened this issue 1 year ago • 3 comments

问题描述

如题描述,文档中没找到相关的说明。另:重现链接中的例子是官方的demo,但是有报错

重现链接

https://codesandbox.io/s/gallant-moser-xudzst?file=/ReactNode/demo.tsx

重现步骤

请查看demo

预期行为

有方式可以配置节点的anchorPoints

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]
  • G6 版本: 4+

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

asevenm avatar Jul 24 '22 02:07 asevenm

https://codesandbox.io/s/gallant-moser-xudzst?file=/App.jsx image 目前发现这样处理可以满足需求,但是anchorPoints的属性应该是传给了最后一个元素(如截图中的Rect),这样的话自定义节点的时候都需要在最后加上一个“虚拟元素”来让连线显示正常

asevenm avatar Jul 24 '22 08:07 asevenm

好的谢谢,我排查一下

Yanyan-Wang avatar Jul 29 '22 02:07 Yanyan-Wang

好的谢谢,我排查一下

您好,这个有安排处理了吗?我们业务中需要使用react自定义节点,但是这个报错,还用不起来 image

asevenm avatar Sep 02 '22 03:09 asevenm