bpmn-io / bpmn-js

A BPMN 2.0 rendering toolkit and web modeler.
https://bpmn.io/toolkit/bpmn-js/
Other
8.55k stars 1.32k forks source link

Connection label overlapping connection #2193

Open ntkibm opened 3 months ago

ntkibm commented 3 months ago

Is your feature request related to a problem? Please describe.

Is it possible to avoid connection label overlapping the connection itself. Mostly this happens when the connection is vertical and even a couple of words causes it to overlap.

connection-overlap

Describe the solution you'd like

It would be nice if the label auto moved to right or left of the connection. (or top or bottom if the connection is horizontal)

Describe alternatives you've considered

I don't know if there are any alternatives for this, but open to hear if there is any.

Additional context

If there is no straight-forward solution to this, then can you share any pointers around what kind of custom handling would be required to handle this, if possible.

nikku commented 3 months ago

I love your report and would kindly ask you to use our existing issue template. Important context may otherwise not be provided; for example we routinely ask you for alternatives that you considered.

ntkibm commented 3 months ago

sorry about that, updated the issue as per the template.

nikku commented 3 months ago

Would a white background of labels be a solution for you? I find this to be a common pattern for labels across different drawing and editor tools.

image

ntkibm commented 3 months ago

problem with a white background is that it breaks the connection visually, and in some cases where the connection line is smaller, it can be really hard to recognise the connection hidden behind the label with background.

philippfromme commented 3 months ago

@ntkibm What would be a better alternative?

ntkibm commented 2 months ago

i don't know.. no other viable alternatives come to mind. The requested solution of 'auto moving the label to the side of the connection once the user is done typing' feels like the only way.

philippfromme commented 2 months ago

Moving this to backlog for now.