0

我有一个 antv/g6 图,通过全局配置将节点配置为具有特定大小,比如 10。这是一个代码片段...

export function setupConfiguration() {
  //   const graph = new G6.Graph({
  const configuration = {
    defaultNode: {
      size: 10,
      // selection of rects works. Circles have a halo around them. WHY?
      type: "rect",
      style: {
        fill: "steelBlue",
...

给定graph对象,获取节点大小的过程是什么?当然,我可以在执行 a 后直接访问console.log(graph),但这是不好的做法。当然必须有一个 getter 来访问全局属性。感谢您提供的任何见解。

4

0 回答 0