new perspective command

This commit is contained in:
Jan Prochazka
2022-09-01 11:18:25 +02:00
parent a910e91a91
commit eab5f4fe5e
5 changed files with 33 additions and 6 deletions

View File

@@ -116,7 +116,16 @@ export function createPerspectiveNodeConfig(name: { schemaName?: string; pureNam
return node;
}
export function createPerspectiveConfig(rootObject: { schemaName?: string; pureName: string }): PerspectiveConfig {
export function createPerspectiveConfig(rootObject?: { schemaName?: string; pureName: string }): PerspectiveConfig {
if (!rootObject) {
return {
nodes: [],
references: [],
isArranged: true,
rootDesignerId: null,
};
}
const rootNode = createPerspectiveNodeConfig(rootObject);
return {
nodes: [rootNode],