antvis/G6

Setting the combo size does not take effect #6446

lvsheshamo posted onGitHub

Describe the bug / 问题描述

使用官网例子,设置combo size不生效

import { Graph } from '@antv/g6';

const data = { nodes: [ { id: 'node1', combo: 'combo1', style: { x: 250, y: 150,size:100 } }, { id: 'node2', combo: 'combo1', style: { x: 350, y: 150 } }, { id: 'node3', combo: 'combo2', style: { x: 250, y: 300 } }, ], edges: [], combos: [{ id: 'combo1', combo: 'combo2' }, { id: 'combo2',style:{size:[400,200]} }], };

const graph = new Graph({ container: 'container', data, node: { style: { labelText: (d) => d.id, }, }, combo: { type: 'rect', fixSize:[200,800], style: { padding: 20,

},

}, behaviors: ['drag-element', 'collapse-expand'], });

graph.render();

No response

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

No response

G6 Version / G6 版本

🆕 5.0.26

Operating System / 操作系统

Windows

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


Combo 有收起态和展开态两种状态。展开态的大小会根据子节点的大小和布局自动计算,而收起态的大小可以通过属性 collapsedSize 指定。

目前,内置功能不支持指定展开态的大小,但可以通过自定义 combo 并复写 getExpandedKeySize 方法来实现。

posted by yvonneyx 6 months ago

Combo 有收起态和展开态两种状态。展开态的大小会根据子节点的大小和布局自动计算,而收起态的大小可以通过属性 collapsedSize 指定。

目前,内置功能不支持指定展开态的大小,但可以通过自定义 combo 并复写 getExpandedKeySize 方法来实现。 谢谢解答,可以给一个示例吗?

posted by lvsheshamo 6 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