diff --git a/src/rootPages/Designer/editors/views/ABViewContainer.js b/src/rootPages/Designer/editors/views/ABViewContainer.js index 4edf15e..5d7a9e5 100644 --- a/src/rootPages/Designer/editors/views/ABViewContainer.js +++ b/src/rootPages/Designer/editors/views/ABViewContainer.js @@ -81,6 +81,10 @@ export default function (AB) { init(AB) { var Dashboard = $$(this.ids.component); if (Dashboard) { + // Clear out any existing child views + Dashboard.getChildViews().forEach((childView) => { + Dashboard.removeView(childView); + }); webix.extend(Dashboard, webix.OverlayBox); webix.extend(Dashboard, webix.ProgressBar); } diff --git a/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js b/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js index 68e7f97..6bdefd9 100644 --- a/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js +++ b/src/rootPages/Designer/ui_work_interface_workspace_editor_layout.js @@ -257,7 +257,18 @@ export default function (AB) { } // editorComponent.ui.id = ids.editArea; // webix.ui(editorComponent.ui, $$(ids.editArea)); - $$(ids.editArea).addView(editorComponent.ui()); + const editorUI = editorComponent.ui(); + editorUI.id = `${ids.editArea}_dashboard_layout`; + + // clear out widgets in our dashboard area + const idDashboard = editorUI.rows[0].id; + const $dashboard = $$(idDashboard); + if ($dashboard) $dashboard.clearAll(); + + // add the editorUI if it is not already added + if ($$(ids.editArea).queryView({ id: editorUI.id }) == null) + $$(ids.editArea).addView(editorUI); + editorComponent.init(this.AB, 2); // note: parentAccessLevel = 2 here in our Designer