Refactor widgets/nodes

This commit is contained in:
space-nuko
2023-05-16 20:15:42 -05:00
parent e8567708fc
commit 0d6395c072
26 changed files with 580 additions and 1153 deletions

View File

@@ -23,13 +23,21 @@
export let dragDisabled: boolean = false;
export let isMobile: boolean = false;
let attrsChanged: Writable<boolean> | null = null;
let attrsChanged: Writable<number> | null = null;
let children: IDragItem[] | null = null;
const flipDurationMs = 100;
$: if (container) {
children = $layoutState.allItems[container.id].children;
attrsChanged = container.attrsChanged
const entry = $layoutState.allItems[container.id]
if (entry) {
children = $layoutState.allItems[container.id].children;
attrsChanged = container.attrsChanged
}
else {
container = null;
children = null;
attrsChanged = null;
}
}
else {
children = null;