Skip to content

Commit

Permalink
fix: g版本升级,supportsCSSTransform=true是默认设置
Browse files Browse the repository at this point in the history
  • Loading branch information
interstellarmt committed Dec 27, 2024
1 parent b9ca90b commit fb06d01
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions __tests__/unit/api/chart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,6 @@ describe('Chart', () => {
});
});

it('Chart({...}) should set canvas.supportsCSSTransform to true.', async () => {
const chart = new Chart({
canvas: createNodeGCanvas(640, 480),
});
await chart.render();
expect(chart.getContext().canvas?.getConfig().supportsCSSTransform).toBe(
true,
);
});

it('chart.getContainer() should return container.', () => {
const canvas = createNodeGCanvas(640, 480);
const container = canvas.getConfig().container as HTMLDivElement;
Expand Down
1 change: 0 additions & 1 deletion src/api/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export class Runtime<Spec extends G2Spec = G2Spec> extends CompositionNode {
render(): Promise<Runtime<Spec>> {
if (this._rendering) return this._addToTrailing();
if (!this._context.canvas) this._createCanvas();
this._context.canvas.getConfig().supportsCSSTransform = true;
this._bindAutoFit();
this._rendering = true;
const finished = new Promise<Runtime<Spec>>((resolve, reject) =>
Expand Down

0 comments on commit fb06d01

Please sign in to comment.