Skip to content

Commit

Permalink
fix: this丢失问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xuying.xu committed Sep 24, 2024
1 parent e1f6ffb commit 01ad4d1
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/f-my/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,7 @@ Component({
return;
}

const {
width,
height,
createImage,
requestAnimationFrame,
cancelAnimationFrame,
} = canvas;
const { width, height } = canvas;

const pixelRatio = getPixelRatio();

Expand All @@ -122,9 +116,9 @@ Component({
height,
pixelRatio,
context,
createImage,
requestAnimationFrame,
cancelAnimationFrame,
createImage: canvas.createImage.bind(canvas),
requestAnimationFrame: canvas.requestAnimationFrame.bind(canvas),
cancelAnimationFrame: canvas.cancelAnimationFrame.bind(canvas),
});
fCanvas.render().catch((error) => {
this.catchError(error);
Expand Down

0 comments on commit 01ad4d1

Please sign in to comment.