From b12dc80cfda0905731a1a8cc6d9ffc720936d5a2 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Wed, 28 May 2025 10:48:39 +0800 Subject: [PATCH] (flutter) (web) only set position/zIndex for canvas if createCanvas is true --- .../thermion_flutter_web/lib/thermion_flutter_web.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/thermion_flutter/thermion_flutter_web/lib/thermion_flutter_web.dart b/thermion_flutter/thermion_flutter_web/lib/thermion_flutter_web.dart index 7263b310..af334fcb 100644 --- a/thermion_flutter/thermion_flutter_web/lib/thermion_flutter_web.dart +++ b/thermion_flutter/thermion_flutter_web/lib/thermion_flutter_web.dart @@ -86,8 +86,10 @@ class ThermionFlutterWebPlugin extends ThermionFlutterPlatform { // canvas.style.display = "none"; document.body!.appendChild(canvas); - (canvas as HTMLElement).style.position = "fixed"; - (canvas as HTMLElement).style.zIndex = "-1"; + if (options.createCanvas) { + (canvas as HTMLElement).style.position = "fixed"; + (canvas as HTMLElement).style.zIndex = "-1"; + } final config = FFIFilamentConfig( backend: Backend.OPENGL,