Skip to content

Commit

Permalink
[FEAT] Disable pool collapsing (#307)
Browse files Browse the repository at this point in the history
The upcoming bpmn-visualization version changes the edge rendering. There is no more usage of the Segment Connector.
This setting was recomputing the whole edge path. It was able to set the terminal waypoints to the collapsed pools when
the edge was targeting a inner element of the pool (hidden when the pool is collapsed).
There is no more waypoints' computation with the new implementation: in this case, we see a dangling edge. The edge
terminal waypoint are inside the pool.
  • Loading branch information
tbouffard authored Mar 21, 2022
1 parent 4fd5280 commit 71ccea7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<div class="col-12 mb-2">
<h2>Select elements by BPMN kind</h2>
Once the BPMN diagram is loaded, detect all <code>Pools</code> and <code>End Events</code>.<br>
Then, use this information to select <code>Pools</code> (hide or collapse) and make <code>End Events</code> clickable
Then, use this information to select <code>Pools</code> (hide others) and make <code>End Events</code> clickable
(as far as no <code>Pools</code> selection is done. Toast support <a href="https://github.com/caroso1222/notyf">Notyf</a>).
</div>
<div id="controls" style="margin-top: 25px" >
Expand All @@ -111,6 +111,7 @@ <h2>Select elements by BPMN kind</h2>
<ul class="menu custom-dropdown" id="dropdown-select-pool">
</ul>
</div>
<!-- Disable collapsing: see https://github.com/process-analytics/bpmn-visualization-examples/pull/306
<div class="col-3 float-left">
<div class="align-middle">
<div class="radio">
Expand All @@ -121,6 +122,7 @@ <h2>Select elements by BPMN kind</h2>
</div>
</div>
</div>
-->
<div id="pool-selection-info" class="col-5 float-left hidden">
<b>Last selected Pool:</b> <span id="last-selected-pool-name"></span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ function changePoolsVisibility(pools, poolIdToHighlight) {
console.info('Updating model, pool to highlight:', poolIdToHighlight);
const model = bpmnVisualization.graph.getModel();

const poolSelectionMethod = getRadioGroupValue('poolSelectionMethod');
// TMP disable collapsing other pools, see https://github.com/process-analytics/bpmn-visualization-examples/pull/306
// const poolSelectionMethod = getRadioGroupValue('poolSelectionMethod');
const poolSelectionMethod = 'hide';
console.info('Selection method:', poolSelectionMethod);
const hideOthers = poolSelectionMethod === 'hide';
const modelChangeFunction = hideOthers ?
Expand Down

0 comments on commit 71ccea7

Please sign in to comment.