fix: make canvas visible

- automate editor background handling
This commit is contained in:
Felix Roos 2023-12-14 23:00:18 +01:00
parent d23cac506c
commit 29082808cb
2 changed files with 6 additions and 1 deletions

View file

@ -150,6 +150,11 @@ export class StrudelMirror {
onEvaluate: () => this.evaluate(),
onStop: () => this.stop(),
});
const cmEditor = this.root.querySelector('.cm-editor');
if (cmEditor) {
this.root.style.backgroundColor = 'var(--background)';
cmEditor.style.backgroundColor = 'transparent';
}
}
async drawFirstFrame() {
if (!this.onDraw) {