From b44efcf120a8da786ad7b6df8e743be04bf2f0e4 Mon Sep 17 00:00:00 2001 From: Dou Du Date: Mon, 27 May 2024 13:55:25 +0200 Subject: [PATCH] change NLG background according to the theme --- src/widget.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/widget.tsx b/src/widget.tsx index e4d21eb..9861499 100644 --- a/src/widget.tsx +++ b/src/widget.tsx @@ -82,7 +82,11 @@ export class CounterWidget extends ReactWidget { visualizer() { this.updateDatasource(); - this.stage = new NGL.Stage(this.uuid, { backgroundColor: 'white' }); + if (this.theme === 'light') { + this.stage = new NGL.Stage(this.uuid, { backgroundColor: 'white' }); + } else { + this.stage = new NGL.Stage(this.uuid, { backgroundColor: 'black' }); + } window.addEventListener( 'resize',