From 0298451427437e9bf72ed461a05ba0620461c7ad Mon Sep 17 00:00:00 2001 From: ShuangLiu Date: Fri, 11 Aug 2023 16:13:47 +0800 Subject: [PATCH] fix(canvas): fix external canvas style --- 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';