Skip to content

Commit 854cb56

Browse files
committed
improved importing ocif groups in code flow canvas
1 parent 8c9773d commit 854cb56

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

libs/app-canvas/src/app/importers/ocif-importer.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,16 @@ export const importOCIF = (ocif: any) => {
271271
groupedNodeIds: group.members,
272272
} as any,
273273
});
274+
275+
group.members.forEach((memberId: string) => {
276+
const nodeInFlow = flow.flows['flow'].nodes.find(
277+
(node) => node.id === memberId
278+
);
279+
if (nodeInFlow && nodeInFlow.nodeInfo) {
280+
nodeInFlow.nodeInfo.isInGroup = true;
281+
nodeInFlow.nodeInfo.groupId = relation.id;
282+
}
283+
});
274284
}
275285
}
276286
});

libs/visual-programming-system/src/components/node-selector.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,24 @@ export class NodeSelector<T extends BaseNodeInfo> {
498498
this.createCompositionButtons.domElement as HTMLElement
499499
).style.borderWidth = `${reversScale}px`;
500500
}
501+
502+
if (this.createGroupButton) {
503+
(this.createGroupButton.domElement as HTMLElement).style.fontSize = `${
504+
12 * reversScale
505+
}px`;
506+
(this.createGroupButton.domElement as HTMLElement).style.padding = `${
507+
0.5 * reversScale
508+
}rem`;
509+
(this.createGroupButton.domElement as HTMLElement).style.margin = `${
510+
0.5 * reversScale
511+
}rem`;
512+
(
513+
this.createGroupButton.domElement as HTMLElement
514+
).style.borderRadius = `${0.15 * reversScale}rem`;
515+
(
516+
this.createGroupButton.domElement as HTMLElement
517+
).style.borderWidth = `${reversScale}px`;
518+
}
501519
if (this.toolsNodesPanel) {
502520
(this.toolsNodesPanel.domElement as HTMLElement).style.bottom = `-${
503521
48 * reversScale

0 commit comments

Comments
 (0)