Label ellipsis in Task

is there an algorithm that determines at what point the label crosses “Task”. Another problem is that task blocks can be resized and the label only needs to be trimmed when the text extends beyond the block. Currently settled on a solution, but here is a static value for label


After resizing


I would like it to be like this. And the trimming did not take place on a fixed number of characters, but on those that did not fit in the block


As I understand you’re request is:

  • Tasks can be resized
  • But labels should not overflow, but be cut of using ellipsis

Can you confirm?

Yes, that’s exactly right.

Text layouting is implemented at the core in diagram-js/lib/util/Text. bpmn-js adds the TextRenderer service as an abstraction to render all texts.

I’d presume you’d want to plug into the later to implement your own text rendering.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.