wip fix
This commit is contained in:
parent
cdd87addac
commit
1748c55641
|
|
@ -101,10 +101,16 @@ export const loadCompSnapshot = async (
|
||||||
p.comp.list[comp_id].meta = updated.meta;
|
p.comp.list[comp_id].meta = updated.meta;
|
||||||
p.comp.list[comp_id].tree = updated.tree;
|
p.comp.list[comp_id].tree = updated.tree;
|
||||||
}
|
}
|
||||||
|
p.comp.loaded[comp_id] = doc
|
||||||
|
.getMap("map")
|
||||||
|
.get("root")
|
||||||
|
?.toJSON() as IItem;
|
||||||
|
|
||||||
if (isTextEditing()) {
|
if (isTextEditing()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
treeRebuild(p);
|
||||||
|
p.render();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -191,7 +197,7 @@ export const updateComponentMeta = async (
|
||||||
|
|
||||||
p.comp.loaded[comp_id] = item;
|
p.comp.loaded[comp_id] = item;
|
||||||
|
|
||||||
return { meta, tree };
|
return { meta, tree, item };
|
||||||
};
|
};
|
||||||
|
|
||||||
const transact = {
|
const transact = {
|
||||||
|
|
|
||||||
|
|
@ -232,6 +232,7 @@ export const edInitSync = (p: PG) => {
|
||||||
} else if (data.type === "comp") {
|
} else if (data.type === "comp") {
|
||||||
const updated = await updateComponentMeta(p, doc, data.id);
|
const updated = await updateComponentMeta(p, doc, data.id);
|
||||||
if (updated) {
|
if (updated) {
|
||||||
|
console.log(updated.item);
|
||||||
p.comp.list[data.id].meta = updated.meta;
|
p.comp.list[data.id].meta = updated.meta;
|
||||||
p.comp.list[data.id].tree = updated.tree;
|
p.comp.list[data.id].tree = updated.tree;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue