Can BPMN connection lines ( sequence ) be controlled to restrict the number of waypoints

We are using BPMN node based Modeler in our application ( bpmn-js/lib/Modeler ). We would like to restrict the number of waypoints to ensure that connecting sequence are either horizontal or vertical

Current behaviour ( Image 1 )

image

Expected behaviour ( Image 2 )

image

As shown in Image 1 we can drag connecting sequence in different directions ( Render HTML to End node connection in image ), we want to restrict that behaviour and have a clean look always as shown in Image 2 ( Render HTML to End node connection in image ).

Does BPMN JS provide any hook point to control this behaviour ?

The connection in the first image can only be created by manually adding bendpoints. You could disable this feature to prevent users from manually adding bendpoints. However, in some situations this might leave them with connections that aren’t usable, e.g.

brave_CehXh1E4LR

@philippfromme Thanks for your response.

What’s the way to disable the bendpoints ? Any bpmn methods references / samples you could point us to ?