允许任意界面图创建 UI 树
移除仅 Page 角色自动创建 UITree 的限制 保持每张界面图与最多一棵 UI 树同步
This commit is contained in:
@@ -140,10 +140,7 @@ function synchronizeDesignImageTrees(state: State): void {
|
||||
imageIds.has(tree.src_ui_design),
|
||||
);
|
||||
for (const [id] of Object.entries(state.ui_design_images)) {
|
||||
if (
|
||||
state.ui_design_images[id]!.metadata.role === 'Page' &&
|
||||
!state.ui_trees.some((tree) => tree.src_ui_design === id)
|
||||
) {
|
||||
if (!state.ui_trees.some((tree) => tree.src_ui_design === id)) {
|
||||
state.ui_trees.push({ src_ui_design: id, root: createPageRoot(state) });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user