You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
github-actionsbot
changed the title
[Bug]: 初始化就是折叠的combo,第一次拖拽会直接闪跳到最左上角。
[Bug]: The initialization is a collapsed combo, and the first time you drag it, it will flash directly to the upper left corner.
Jan 13, 2025
Describe the bug / 问题描述
import { Graph } from '@antv/g6';
fetch('https://assets.antv.antgroup.com/g6/cluster.json')
.then((res) => res.json())
.then((data) => {
data.nodes.forEach(item=>{
if(item.data.cluster == 'd'){
item.combo = 'dd'
}
})
data.combos = [{id:'dd',style:{collapsed:true}}]
const graph = new Graph({
container: 'container',
data,
node: {
style: {
labelText: (d) => d.id,
labelBackground: true,
},
palette: {
type: 'group',
field: 'cluster',
},
},
layout: {
type: 'grid',
sortBy: 'id',
nodeSize: 32,
},
behaviors: ['zoom-canvas', 'drag-canvas', 'drag-element'],
});
});
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
上面代码是依据G6官网的示例改造。
复现步骤:
1、复制以上代码运行后
2、拖拽那个折叠的combo
G6 Version / G6 版本
🆕 5.x
OS / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: