From 52ead76dd804eb518e35214be83656d0f0935fbd Mon Sep 17 00:00:00 2001 From: dank074 Date: Thu, 20 Jul 2023 21:14:08 -0500 Subject: [PATCH] set canvas background (#157) * prevent scrolling canvas on mobile * set canvas background color --- src/components/floorplan-editor/common/FloorplanEditor.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/floorplan-editor/common/FloorplanEditor.ts b/src/components/floorplan-editor/common/FloorplanEditor.ts index f81c38f8..23495bd9 100644 --- a/src/components/floorplan-editor/common/FloorplanEditor.ts +++ b/src/components/floorplan-editor/common/FloorplanEditor.ts @@ -334,7 +334,8 @@ export class FloorplanEditor public clearCanvas(): void { - this.renderer.clearRect(0, 0, this._renderer.canvas.width, this._renderer.canvas.height); + this.renderer.fillStyle = '0x000000'; + this.renderer.fillRect(0, 0, this._renderer.canvas.width, this._renderer.canvas.height); } public get renderer(): CanvasRenderingContext2D