Hi,
I’m trying using pure diagram-js (not bpmn) and trying to handle sub-elements (In my meaning - elements that are placed inside another element).
However facing some issues which I didn’t dig too much yet but decided to ask you first becuause may you gave a hint where to start looking for (maybe somewhere in bpmn-js since there is sub-process concept).
My issues actually are not actually related to collapsing elements but to connections between them (or maybe rather more specific to who is the edge parent).
Issues:
- Edge between inner shape and outer shape enlarges parent element after enlarge.
- Edge points to hidden shape and sometimes (after enlarging) is not visible (depends I think if the source was child of root or target):
- The edge is still visible after collapsing when both shapes where created and connected outside the parent shape, and then moved one by one to the parent:
I’m not asking you to solve me this issue of course (I’m aware that such behavior might be due to my implementation), but maybe you already gone through similar problems when implementing more specific diagrams (like bpmn), and have some ideas, code snippet or tips that can help me.
Maybe I went the wrong way earlier when implement ‘connect’ function where taking parent of the source for the edge (?):
this.createConnection(source, target, { ...rulesAttrs, ...attrs }, source.parent, hints);
Maybe I should use ‘root’ shape for all edges?
I appreciate any suggestion.
Regards,
Michal