antvis/G6

[V5] Wrong custom arrow style #6425

IceLeach posted onGitHub

Describe the bug / 问题描述

使用style.endArrowD自定义箭头,箭头显示位置不正确 image

https://stackblitz.com/edit/react-1xbp7e?file=index.js

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

拖动节点,如图所示

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


自定义需要确保箭头形状基于原点x、y轴对称,可以调整为下述代码块:

{
    endArrowD: 'M-14,0 L-4,-4 L0,-14 L4,-4 L14,0 L4,4 L0,14 L-4,4 Z',
    endArrowOffset: 14,
}
posted by yvonneyx 6 months ago

Fund this Issue

$0.00
Funded

Pull requests