From bb89a68c3bd647a105c672ae8270a33ce6eae160 Mon Sep 17 00:00:00 2001 From: ShuangLiu Date: Fri, 11 Aug 2023 16:18:19 +0800 Subject: [PATCH] fix(canvas): fix external canvas style (#284) resolve #283 --- src/gfx/graphics/webGpu/Context3D.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx/graphics/webGpu/Context3D.ts b/src/gfx/graphics/webGpu/Context3D.ts index a36f4290..b271e41d 100644 --- a/src/gfx/graphics/webGpu/Context3D.ts +++ b/src/gfx/graphics/webGpu/Context3D.ts @@ -39,7 +39,7 @@ class Context3D { if (_width != this.canvas.clientWidth) this.canvas.style.width = _width + 'px' if (_height != this.canvas.clientHeight) - this.canvas.style.width = _height + 'px' + this.canvas.style.height = _height + 'px' } else { this.canvas = document.createElement('canvas'); // this.canvas.style.position = 'fixed';