提交 a3a5c882 编写于 作者: H hdx

fix(create-canvas-context-async): 高清逻辑太晚导致宽高不对

上级 988cc285
...@@ -46,11 +46,10 @@ ...@@ -46,11 +46,10 @@
component: this, component: this,
success: (context : CanvasContext) => { success: (context : CanvasContext) => {
this.canvasContext = context.getContext('2d')!; this.canvasContext = context.getContext('2d')!;
hidpi(this.canvasContext!.canvas);
this.canvasWidth = this.canvasContext!.canvas.width; this.canvasWidth = this.canvasContext!.canvas.width;
this.canvasHeight = this.canvasContext!.canvas.height; this.canvasHeight = this.canvasContext!.canvas.height;
hidpi(this.canvasContext!.canvas);
// #ifdef WEB // #ifdef WEB
context.toBlob((blob : Blob) => { context.toBlob((blob : Blob) => {
this.testToBlobResult = (blob.size > 0 && blob.type == 'image/jpeg') this.testToBlobResult = (blob.size > 0 && blob.type == 'image/jpeg')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册