From 27570a7756b3cb75ea1bb495a9e441dbe2990cd8 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 22 May 2022 15:27:40 +0200 Subject: [PATCH] fix for canvas theme after opening help --- src/public/app/widgets/type_widgets/canvas.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/public/app/widgets/type_widgets/canvas.js b/src/public/app/widgets/type_widgets/canvas.js index 2805b7478..23e8cdbbd 100644 --- a/src/public/app/widgets/type_widgets/canvas.js +++ b/src/public/app/widgets/type_widgets/canvas.js @@ -187,7 +187,7 @@ export default class ExcalidrawTypeWidget extends TypeWidget { content = { elements: [], - appState: [], + appState: {}, files: [], }; } @@ -376,7 +376,8 @@ export default class ExcalidrawTypeWidget extends TypeWidget { ref: excalidrawWrapperRef }, React.createElement(Excalidraw.default, { - theme: "light", // not in effect, but causes the theme toggle button to disappear + // this makes sure that 1) manual theme switch button is hidden 2) theme stays as it should after opening menu + theme: this.themeStyle, ref: excalidrawRef, width: dimensions.width, height: dimensions.height,