elk icon indicating copy to clipboard operation
elk copied to clipboard

Mixing long and short labels over multiple layers causes too much space to be reserved for the short labels

Open NiklasRentzCAU opened this issue 3 years ago • 0 comments

The following SCChart is the minimal version, where having multiple layers with both very long and short labels causes the short labels to reserve seemingly way too much space:

scchart TooMuchLabelSpace {

	region someRegion "" {
		initial state first
		go to second label "someLongLabelaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
		go to second label "someLongLabelaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
		go to second
		go to end

		state second
		go to end label "someLongLabelaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
		go to end label "someLongLabelaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
		go to end

		state end
	}
}

TooMuchLabelSpace The logs from ELK: TooMuchLabelSpace.zip

Here the edge labeled "4:" should be further to the left and not waste the space. Stacking even more of these layers makes the issue even more prominent, here an example for that:

TooMuchLabelSpace2

NiklasRentzCAU avatar Apr 22 '22 09:04 NiklasRentzCAU