X6 icon indicating copy to clipboard operation
X6 copied to clipboard

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

Open America-first-melon opened this issue 2 years ago • 4 comments

问题描述

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 重绘,性能卡顿

America-first-melon avatar Oct 18 '23 06:10 America-first-melon

👋 @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.

x6-bot[bot] avatar Oct 18 '23 06:10 x6-bot[bot]

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

Vulgarever avatar Nov 08 '23 03:11 Vulgarever

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

qingciyun avatar Dec 26 '23 11:12 qingciyun