summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.util.ts')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.util.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.util.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.util.ts
index 9ba7271fb..fd4dd35e4 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.util.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/graph.util.ts
@@ -211,4 +211,18 @@ export class GraphUtil {
return !parentCell.get('embeds') || parentCell.get('embeds').length < 1;
}
+ getActionSiblings(actionCell: joint.shapes.app.ActionElement,
+ boardGraph: joint.dia.Graph
+ ): joint.shapes.app.ActionElement[] {
+ const cellId = actionCell.id;
+ const siblings = boardGraph.getCells().filter(elem => {
+ const type = elem.attributes.type;
+ const elemId = elem.id;
+ return (type !== undefined && type === 'app.ActionElement'
+ && elemId !== cellId);
+ }) as joint.shapes.app.ActionElement[];
+ console.log('siblings', siblings);
+ return siblings;
+ }
+
}