Skip to content

Commit

Permalink
change NLG background according to the theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dou Du committed May 27, 2024
1 parent 3aeee23 commit b44efcf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/widget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b44efcf

Please sign in to comment.