Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge双击修改label时无法正常保存 #2522

Closed
zhongjingpo opened this issue Aug 16, 2022 · 2 comments · Fixed by #2620
Closed

Edge双击修改label时无法正常保存 #2522

zhongjingpo opened this issue Aug 16, 2022 · 2 comments · Fixed by #2620
Labels
type: bug 缺陷 Defects and unexpected behaviors

Comments

@zhongjingpo
Copy link

问题描述

使用selection:change在选中边时加上filter效果,取消选中的时候去掉filter效果。
加上这个之后导致双击编辑label修改文字之后,label无法正常保存。
经过排查,如果删除selection:change中 args.removed.forEach(cell => {cell.attr("line/filter",null)}),就是删除取消选中时的逻辑代码就能正常保存。
以下是我selection的代码
graph.on("selection:changed", (args) => {
args.added.forEach((cell) => {
cell.attr("line/filter", {
name: "highlight",
args: {
color: "#dc5246",
width: 1,
blur: 0,
opacity: 0.2
}
});
});

  args.removed.forEach((cell) => {
    cell.attr("line/filter", null);
  });
});

重现链接

https://codesandbox.io/s/billowing-rgb-ew7rcv?file=/src/App.tsx

重现步骤

1.双击边上的label

2.修改label的内容
3.失去焦点后label的内容依旧是之前的内容

删除取消选中的代码
1.双击边上的label
2.修改label的内容
3.失去焦点后label的内容正常修改,但是因为删除取消选中的代码,边会一直有个filter效果

预期行为

选中边能正常加上filter,可以正常修改label,修改完取消选中后能删除filter效果

平台

  • 操作系统: [Windows]
  • 网页浏览器: [Google Chrome]
  • X6 版本: [1.32.11,1.33.1 ]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Aug 16, 2022

👋 @zhongjingpo

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector NewByVector linked a pull request Sep 4, 2022 that will close this issue
15 tasks
@NewByVector NewByVector added the type: bug 缺陷 Defects and unexpected behaviors label Sep 4, 2022
@x6-bot
Copy link
Contributor

x6-bot bot commented Sep 5, 2023

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.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Sep 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug 缺陷 Defects and unexpected behaviors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants