Skip to content

Commit

Permalink
Configure fork and join nodes as not resizable (#232)
Browse files Browse the repository at this point in the history
Update type hints configuration for workflow example to make fork and join nodes not resizable
=> we have test cases for both resizable and non-resizable elements in the diagram
  • Loading branch information
tortmayr authored Jun 12, 2024
1 parent 64a4e3d commit e7713ee
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,18 @@ public Map<String, EClass> getTypeMappings() {
@Override
public List<ShapeTypeHint> getShapeTypeHints() {
List<ShapeTypeHint> nodeHints = new ArrayList<>();
nodeHints.add(new ShapeTypeHint(MANUAL_TASK, true, true, true, true));
nodeHints.add(new ShapeTypeHint(AUTOMATED_TASK, true, true, true, true));
ShapeTypeHint catHint = new ShapeTypeHint(CATEGORY, true, true, true, true);
nodeHints.add(createDefaultShapeTypeHint(MANUAL_TASK));
nodeHints.add(createDefaultShapeTypeHint(AUTOMATED_TASK));
ShapeTypeHint catHint = createDefaultShapeTypeHint(CATEGORY);
catHint.setContainableElementTypeIds(
Arrays.asList(TASK, ACTIVITY_NODE, CATEGORY));
nodeHints.add(catHint);
nodeHints.add(createDefaultShapeTypeHint(FORK_NODE));
nodeHints.add(createDefaultShapeTypeHint(JOIN_NODE));
ShapeTypeHint forkHint = createDefaultShapeTypeHint(FORK_NODE);
forkHint.setResizable(false);
nodeHints.add(forkHint);
ShapeTypeHint joinHint = createDefaultShapeTypeHint(JOIN_NODE);
joinHint.setResizable(false);
nodeHints.add(joinHint);
nodeHints.add(createDefaultShapeTypeHint(DECISION_NODE));
nodeHints.add(createDefaultShapeTypeHint(MERGE_NODE));
return nodeHints;
Expand Down

0 comments on commit e7713ee

Please sign in to comment.