antvis/G6

[Bug]: The endpoint setting sourcePort and targetPort lines are occluded #6629

vxow posted onGitHub

Describe the bug / 问题描述

设置线的端点,线会被节点遮挡 type: 'polyline' router设置'orth'、'shortest-path'都会出现遮挡

https://codesandbox.io/p/sandbox/y4s8t7

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

@yvonneyx 有什么好办法解决这种遮挡问题么

posted by vxow 4 months ago

这是由于 dagre 布局会同时返回节点位置和控制点结果,折线的正交路由会将控制点计算在内。你可以手动将控制点清空,以便路由算法重新计算拐点。

 edge: {
    type: "polyline",
    style: {
      router: {
        type: "orth",
      },
      controlPoints: [],
    },
  },
posted by yvonneyx 4 months ago

@yvonneyx 试过这个办法,效果是改善了一些,但是还是会出现遮挡,有什么自定义的方法能够弥补么。

<img width="669" alt="image" src="https://github.com/user-attachments/assets/76918507-ba66-4fe5-be85-14088a0ea9f8" />

posted by vxow 4 months ago
posted by yvonneyx 4 months ago

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. | 由于该 issue 缺少关键信息且已闲置 7 天,现已自动关闭。如需重新打开此问题,请提供所缺失的信息。。

posted by github-actions[bot] 4 months ago

Fund this Issue

$0.00
Funded

Pull requests