Skip to content

Commit a8dd349

Browse files
committed
chore: 删除无用字段 CollapseExpandNodeOptions.align & 补充测试 behavior-expand-collapse-node collapsed 初始状态
1 parent 5646ae8 commit a8dd349

17 files changed

+130
-135
lines changed

packages/g6/__tests__/demos/behavior-expand-collapse-node.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const behaviorExpandCollapseNode: TestCase = async (context) => {
99
id: 'A',
1010
children: [
1111
{ id: 'B', children: [{ id: 'D' }, { id: 'E' }] },
12-
{ id: 'C', children: [{ id: 'F' }, { id: 'G' }] },
12+
{ id: 'C', children: [{ id: 'F' }, { id: 'G' }], style: { collapsed: true } },
1313
],
1414
}),
1515
node: {
@@ -26,7 +26,8 @@ export const behaviorExpandCollapseNode: TestCase = async (context) => {
2626
type: 'dendrogram',
2727
nodeSep: 30,
2828
rankSep: 100,
29-
preLayout: false,
29+
preLayout: true,
30+
isLayoutInvisibleNodes: true,
3031
},
3132
behaviors: [{ type: 'collapse-expand', trigger: 'click', align: false }, 'drag-element'],
3233
});

packages/g6/__tests__/snapshots/behaviors/collapse-expand-node/collapse-A-0.svg

Lines changed: 14 additions & 14 deletions
Loading

packages/g6/__tests__/snapshots/behaviors/collapse-expand-node/collapse-A-500.svg

Lines changed: 14 additions & 14 deletions
Loading

packages/g6/__tests__/snapshots/behaviors/collapse-expand-node/collapse-B-0.svg

Lines changed: 4 additions & 4 deletions
Loading

packages/g6/__tests__/snapshots/behaviors/collapse-expand-node/collapse-B-1000.svg

Lines changed: 2 additions & 2 deletions
Loading

packages/g6/__tests__/snapshots/behaviors/collapse-expand-node/collapse-B-500.svg

Lines changed: 4 additions & 4 deletions
Loading

packages/g6/__tests__/snapshots/behaviors/collapse-expand-node/default.svg

Lines changed: 4 additions & 4 deletions
Loading

0 commit comments

Comments
 (0)