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

autoResize 为 true 时,修改 edge 的颜色, 也会导致 manhattan 路由重绘 #3980

Open
America-first-melon opened this issue Oct 18, 2023 · 3 comments
Labels
type: bug 缺陷 Defects and unexpected behaviors

Comments

@America-first-melon
Copy link

America-first-melon commented Oct 18, 2023

问题描述

autoResize 为 true 时,修改 edge 的颜色, 也会导致 manhattan 路由重绘。

重现链接

https://x6.antv.antgroup.com/zh/examples/edge/router/#manhattan

重现步骤

const graph = new Graph({
  container: document.getElementById('container'),
  grid: true,
  autoResize: true,
})

graph.on('edge:mouseenter', ({ edge }) => {
	edge.prop('attrs/line/stroke', 'blue')
})

graph.on('edge:mouseleave', ({ edge }) => {
	edge.prop('attrs/line/stroke', 'red')
})

预期行为

修改颜色,为什么与 路由 计算有关系?

平台

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

屏幕截图或视频(可选)

20231018144302_rec_

补充说明(可选)

简单的 hover 修改颜色,导致大图画布因为 manhattan 重绘,性能卡顿

@x6-bot
Copy link
Contributor

x6-bot bot commented Oct 18, 2023

👋 @America-first-melon

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 added the type: bug 缺陷 Defects and unexpected behaviors label Nov 7, 2023
@Vulgarever
Copy link

遇到了同样的问题,请问有计划修复这个问题吗

@qingciyun
Copy link

+1,hover(修改颜色)为啥会引起重绘?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 缺陷 Defects and unexpected behaviors
Projects
None yet
Development

No branches or pull requests

4 participants