antvis / antvis/Graphin

Update Edge's style will break default Edge's KeyShape 更新边样式会破坏默认边缘的形状

Open
#245 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
1.1k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

更新了边的样式之后,`edge._cfg.keyShape.attrs.lineAppendWidth` 会变成 0,导致用户单击边的时候产生困难

**To Reproduce**

附上沙包: https://codesandbox.io/s/vibrant-thunder-tcev6?file=/App.tsx

1. 单击 [Update Edge]
2. 打开 console 查看 `edge._cfg.keyShape.attrs.lineAppendWidth` 的值

![Screenshot 2021-04-12 at 12 00 31 PM](https://user-images.githubusercontent.com/25884538/114357344-36b97e00-9ba4-11eb-934e-ef06d44e89c1.png)

**Expected behavior**

更新了边的样式之后,`edge._cfg.keyShape.attrs.lineAppendWidth` 的数值需和默认值一样。

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.