JetBrains / MPS-extensions

MPS-extensions aims to ease language development within MPS.
https://jetbrains.github.io/MPS-extensions/
Apache License 2.0
82 stars 50 forks source link

Diagram: Bounding box too small if optional name is involved #556

Open kbirken opened 1 year ago

kbirken commented 1 year ago

In a customer project, we are using an optional name scheme based on grammarcells with an editor component like this:

image

When using this in the diagram editor, the bounding box width is too small, if the optional cell is being used. If it is not visible, the bounding box width is okay. Example:

image

Expected: The space to the right-hand side of any in the second box should have the same width as the space on the rhs of something in the first box.

alexanderpann commented 3 months ago

The issue is that the gap between "something" and "as any" is considered by the layouter but not by the size calculation of the box.