diff --git a/packages/g6/__tests__/demo/case/combo-expand-collapse.ts b/packages/g6/__tests__/demo/case/combo-expand-collapse.ts index b60b52fbdbc..2a851e213b7 100644 --- a/packages/g6/__tests__/demo/case/combo-expand-collapse.ts +++ b/packages/g6/__tests__/demo/case/combo-expand-collapse.ts @@ -25,12 +25,12 @@ export const comboExpandCollapse: STDTestCase = async (context) => { }, node: { style: { - labelText: (d: any) => d.id, + labelText: (d) => d.id, }, }, combo: { style: { - labelText: (d: any) => d.id, + labelText: (d) => d.id, lineDash: 0, collapsedLineDash: [5, 5], }, diff --git a/packages/g6/__tests__/demo/case/element-position-combo.ts b/packages/g6/__tests__/demo/case/element-position-combo.ts index 313c11363f6..26f9aecb7a6 100644 --- a/packages/g6/__tests__/demo/case/element-position-combo.ts +++ b/packages/g6/__tests__/demo/case/element-position-combo.ts @@ -21,12 +21,12 @@ export const elementPositionCombo: STDTestCase = async (context) => { style: { size: 20, labelWordWrapWidth: 200, - labelText: (d: any) => d.id, + labelText: (d) => d.id, }, }, combo: { style: { - labelText: (d: any) => d.id, + labelText: (d) => d.id, }, }, padding: 20, diff --git a/packages/g6/__tests__/demo/case/element-z-index.ts b/packages/g6/__tests__/demo/case/element-z-index.ts index 0d9a7250004..f45385322f9 100644 --- a/packages/g6/__tests__/demo/case/element-z-index.ts +++ b/packages/g6/__tests__/demo/case/element-z-index.ts @@ -25,15 +25,15 @@ export const elementZIndex: STDTestCase = async (context) => { node: { style: { size: 40, - labelText: (d: any) => d.id, + labelText: (d) => d.id, labelWordWrapWidth: 200, - fill: (d: any, index: number) => ['red', 'green', 'blue'][index], + color: (d, index) => ['red', 'green', 'blue'][index], }, }, combo: { style: { - labelText: (d: any) => d.id, - fill: (d: any, index: number) => ['pink', 'cyan', 'purple', 'orange'][index], + labelText: (d) => d.id, + color: (d, index: number) => ['pink', 'cyan', 'purple', 'orange'][index], }, }, behaviors: ['drag-element'], diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/collapse-combo-2.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/collapse-combo-2.svg index f6507826d8a..06877ec7369 100644 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/collapse-combo-2.svg +++ b/packages/g6/__tests__/snapshots/behaviors/behavior-collapse-expand/collapse-combo-2.svg @@ -25,21 +25,10 @@ /> - - - - - - - + - - - - + @@ -153,27 +131,14 @@ - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -151,18 +129,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -174,27 +152,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -151,18 +129,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -174,27 +152,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -151,18 +129,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -174,27 +152,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -151,18 +129,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -174,27 +152,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - - - - + - - - - + - + @@ -147,18 +125,18 @@ stroke="transparent" stroke-width="3" /> - + @@ -170,27 +148,14 @@ - - - - + - - - - + - - - - + - + @@ -102,7 +102,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -269,12 +269,10 @@ @@ -283,12 +281,10 @@ @@ -297,12 +293,10 @@ @@ -311,12 +305,10 @@ diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow.svg index abcd0246250..500da25d412 100644 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow.svg +++ b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo-shadow.svg @@ -46,38 +46,38 @@ - + @@ -102,7 +102,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -269,12 +269,10 @@ @@ -283,12 +281,10 @@ @@ -297,12 +293,10 @@ @@ -311,12 +305,10 @@ diff --git a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo.svg b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo.svg index ff8e32d0a74..3df3709dc08 100644 --- a/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo.svg +++ b/packages/g6/__tests__/snapshots/behaviors/behavior-drag-element/drag-combo.svg @@ -46,38 +46,38 @@ - + @@ -102,7 +102,7 @@ - + @@ -162,7 +162,7 @@ - + @@ -222,7 +222,7 @@ - + @@ -269,12 +269,10 @@ @@ -283,12 +281,10 @@ @@ -297,12 +293,10 @@ @@ -311,12 +305,10 @@ diff --git a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg index 70f97370a5d..3bb8c997aa3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/circle-collapse-bottom.svg @@ -3,7 +3,7 @@ width="500" height="500" style="background: transparent; position: absolute; outline: none;" - color-interpolation-filters="sRGB"≈≈ + color-interpolation-filters="sRGB" tabindex="1" > @@ -29,17 +29,6 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomLeft.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-bottomRight.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-center.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-left.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-right.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-top.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topLeft.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg index 85221b170e4..0903be325f3 100644 --- a/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg +++ b/packages/g6/__tests__/snapshots/elements/combo/rect-collapse-topRight.svg @@ -13,33 +13,22 @@ - - - - + - - - - + diff --git a/packages/g6/__tests__/snapshots/elements/position-combo/default.svg b/packages/g6/__tests__/snapshots/elements/position-combo/default.svg index d28b07cd6c9..2e672ef6268 100644 --- a/packages/g6/__tests__/snapshots/elements/position-combo/default.svg +++ b/packages/g6/__tests__/snapshots/elements/position-combo/default.svg @@ -22,31 +22,20 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + @@ -140,7 +140,7 @@ />