From 83815a8651ae8c6ac2640545f826ddf36f309953 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Sat, 21 Aug 2021 09:21:12 +0100 Subject: [PATCH] fix edit control state on load --- src/component/toolbar/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/component/toolbar/index.js b/src/component/toolbar/index.js index 902662a2..dbd9f3de 100644 --- a/src/component/toolbar/index.js +++ b/src/component/toolbar/index.js @@ -14,6 +14,8 @@ toolbar.bar = {}; toolbar.bar.render = () => { + toolbar.current = new ToolbarControl(); + const body = document.querySelector('body'); switch (state.get.current().toolbar.location) { @@ -29,8 +31,8 @@ toolbar.bar.render = () => { }; toolbar.init = () => { - toolbar.current = new ToolbarControl(); toolbar.bar.render(); + toolbar.current.update.edit(); }; export { toolbar }