antvis/G6

Graph.updateNodeData modifying fill is invalid #6496

ping40 posted onGitHub

Describe the bug / 问题描述

构建图的时候,如果指定了fill的值,则导致 updateNodeData fill的时候无效。

Graph({ container: 'container', autoFit: 'view', data: treeToGraphData(data), behaviors: ['drag-canvas', 'zoom-canvas', 'drag-element'], node: { style: { labelText: (d) => d.id, //fill: '#909399', --》 这一行 labelBackground: true, }, animation: { enter: false, }, },

https://stackblitz.com/edit/p5kmma?file=index.js

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

打开或者 屏蔽 第16行,然后鼠标移动到节点上看fill的变化。

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows, Others / 其他

Browser / 浏览器

Chrome, Firefox

Additional context / 补充说明

No response


谢谢,这种概念方法可行。

但是跟常识有点不匹配。

posted by ping40 5 months ago

Fund this Issue

$0.00
Funded

Pull requests