antvis/G6

【V5】ReactNode节点的size应该怎么自适应。 #6134

Wu-Yao posted onGitHub

Describe the bug / 问题描述

image 使用g6-extension-react自定义节点后,root元素有32px的默认宽高,导致port位置不符合预期,期望root节点为自定义元素的宽高。

No response

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

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

macOS

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


为了保证数据一致性,你需要在 node.style 中同步设置 size

posted by Aarebecca 9 months ago

为了保证数据一致性,你需要在 node.style 中同步设置 size 但size只支持number,期望是fit-content

posted by Wu-Yao 9 months ago

@Wu-Yao 目前还不支持这样,因为会影响边连接以及布局的计算,除非说你的图完全不使用边或者布局

posted by Aarebecca 9 months ago

Fund this Issue

$0.00
Funded

Pull requests