JetBrains / MPS-extensions

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

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

Open kbirken opened 2 years ago

kbirken commented 2 years 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 4 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.