process-analytics / bpmn-layout-generators

Tools for generating missing BPMNDiagram elements in BPMN files
Apache License 2.0
37 stars 6 forks source link

feat(waypoints): start avoiding edge overlap on shape #84

Closed tbouffard closed 3 years ago

tbouffard commented 3 years ago

Add several high level tests to demonstrate for edge overlap on shape. The "vacation request from bonita" also shows the behavior.

Screenshots

Info: first screenshot is the rendering prior this PR

svg

vacation_request_v01_svg_01_before_change vacation_request_v01_svg_02_without_overlapping

bpmn

vacation_request_v01_bpmn_01_before_change

vacation_request_v01_bpmn_02_without_overlapping

Notes

Some overlap still remain. This PR only avoid overlap when the original edge should have been horizontal.

For instance, when involving Bottom Left to Top Right (waypoints-avoid-edge-overlap-03-elements_in_front.bpmn.xml test diagram)

image

Cycle Top Right to Bottom Left neither (waypoints-positions-cycle_02_gateways_in_cycle.bpmn.xml)

image

Refactoring needed

This PR requires refactoring as the WaypointsComputer manages too much things (both positioning and actual points computation) and contains duplications. I suggest to do the refactoring in a dedicated PR to avoid introducing too much changes here.