Skip to content

Commit

Permalink
fix: remove createImage when creating GCanvas
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver committed May 19, 2023
1 parent 0499d11 commit 2ffeeae
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions __tests__/integration/utils/createNodeGCanvas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createCanvas, Image } from 'canvas';
import { createCanvas } from 'canvas';
import { Canvas } from '@antv/g';
import { Renderer } from '@antv/g-canvas';
import { Plugin as DragAndDropPlugin } from '@antv/g-plugin-dragndrop';
Expand All @@ -22,9 +22,5 @@ export function createNodeGCanvas(width: number, height: number): Canvas {
canvas: nodeCanvas as any,
renderer,
offscreenCanvas: offscreenNodeCanvas as any,
createImage: () => {
const image = new Image();
return image as any;
},
});
}

0 comments on commit 2ffeeae

Please sign in to comment.