Refactor & handle node lifecycle

This commit is contained in:
space-nuko
2023-04-29 16:13:35 -07:00
parent 95133df3d9
commit 59cbff1648
6 changed files with 405 additions and 243 deletions

View File

@@ -33,18 +33,11 @@
* Serialize UI panel order so it can be restored when workflow is loaded
*/
export function serialize(): any {
// TODO
}
export function restore(panels: SerializedPanes) {
const id = 0;
$layoutState.root = layoutState.addContainer(null, { direction: "horizontal", showTitle: false });
const left = layoutState.addContainer($layoutState.root.id, { direction: "vertical", showTitle: false });
const right = layoutState.addContainer($layoutState.root.id, { direction: "vertical", showTitle: false });
for (const node of app.lGraph.computeExecutionOrder(false, null)) {
layoutState.nodeAdded(node)
}
console.warn($layoutState)
// TODO
}
function groupWidgets() {