Skip to content

Commit

Permalink
fix: 修复开启 animation 引发 state 样式延迟渲染,导致单测错误 (#2891)
Browse files Browse the repository at this point in the history
* fix: 修复开启 animation 引发 state 样式延迟渲染,导致单测错误

* fix: larger size limit
  • Loading branch information
visiky committed Oct 7, 2021
1 parent 030ed75 commit 0e8de05
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions __tests__/bugs/issue-2573-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('#2573', () => {
},
},
point: {},
animation: false,
});

radar.render();
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/plots/bidirectional-bar/state-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('Bidirectional', () => {
},
},
},
animation: false,
});
plot.render();

Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/plots/box/state-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('box', () => {
},
},
},
animation: false,
});

plot.render();
Expand Down
6 changes: 6 additions & 0 deletions __tests__/unit/plots/facet/use-plot-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ describe('facet', () => {
yField: 'value',
seriesField: 'name',
color: ['red', 'green', 'yellow', 'blue'],
animation: false,
},
};
},
showTitle: false,
meta: { date: { sync: true } },
animation: false,
});
plot.render();

Expand Down Expand Up @@ -124,6 +126,7 @@ describe('facet', () => {
color: ['red', 'green', 'yellow', 'blue'],
xAxis: columnIndex === 0 ? false : {},
yAxis: columnIndex === 0 ? false : {},
animation: false,
},
};
},
Expand Down Expand Up @@ -156,6 +159,7 @@ describe('facet', () => {
seriesField: 'name',
color: ['red', 'green', 'yellow', 'blue'],
tooltip: columnIndex === 0 ? false : {},
animation: false,
},
};
},
Expand Down Expand Up @@ -195,6 +199,7 @@ describe('facet', () => {
seriesField: 'name',
color: ['red', 'green', 'yellow', 'blue'],
interactions: [{ type: 'element-active', enable: false }],
animation: false,
},
};
},
Expand All @@ -220,6 +225,7 @@ describe('facet', () => {
seriesField: 'name',
color: ['red', 'green', 'yellow', 'blue'],
interactions: facet.columnIndex === 0 ? [{ type: 'element-active' }] : [],
animation: false,
},
};
},
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/plots/funnel/state-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('funnel state', () => {
},
},
},
animation: false,
});

plot.render();
Expand Down
1 change: 0 additions & 1 deletion __tests__/unit/plots/gauge/shapes/index-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ describe('gauge', () => {
height: 300,
autoFit: false,
percent: 0.75,

indicator: false,
});

Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/plots/heatmap/state-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('heatmap', () => {
yField: 'day',
colorField: 'sales',
interactions: [{ type: 'element-active' }],
animation: false,
});

heatmap.render();
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/plots/multi-view/state-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe('mix', () => {
},
},
},
animation: false,
},
},
{
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/plots/sankey/state-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('sankey', () => {
sourceField: 'source',
targetField: 'target',
weightField: 'value',
animation: false,
});

sankey.render();
Expand Down
1 change: 1 addition & 0 deletions __tests__/unit/plots/violin/state-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe('violin', () => {
data: BASE_VIOLIN_DATA,
xField: 'type',
yField: 'value',
animation: false,
state: {
selected: {
style: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"limit-size": [
{
"path": "dist/g2plot.min.js",
"limit": "985 Kb"
"limit": "990 Kb"
},
{
"path": "dist/g2plot.min.js",
Expand Down

0 comments on commit 0e8de05

Please sign in to comment.