-
Notifications
You must be signed in to change notification settings - Fork 44
Description
When working on the Text annotation for labels on connection lines, https://specification.modelica.org/master/annotations.html#S9.SS4.p3, we have encountered som surprising deprecations in the specification, and we would like to propose that the deprecations are revisited.
Zero vertical extent
This is the main deprecation we would like to undo:
Having a zero size for the extent is deprecated and is handled as if upper part is moved up an appropriate amount.
When fontSize is specified, not specifying a height makes more sense than specifying it . Can anyone explain why this was deprecated?
To neither specify a (positive) fontSize or a positive vertical extent could be a an excellent way to leave the choice of size to the tool, enabling a consistent look of connection line labels across libraries.
Also, I can't see any deprecation of zero vertical extent for the "regular" Text annotation in https://specification.modelica.org/master/annotations.html#S9.SS5.SSS5.p1. It would make sense if the two Text annotations didn't differ in this regard.
As in many other cases of deprecation, we have noticed that not even the MSL has moved away from the deprecated semantics, which we consider another good reason to undo the deprecation. For example, FullRobot is full of these:
extent={{-6,3},{-6,3}})
In fact, all occurrences of Text for connection lines that I found with a quick'n dirty regexp search had 0 by 0 extent.
Automatic horizontal alignment
I'd also like to bring up the deprecation of this default:
TextAlignment horizontalAlignment =
if index < 0 then TextAlignment.Right else TextAligment.Left "Note: different default";
While it is clear to me that the default is bad (it makes assumptions about how the connection line is oriented) and that this can be seen as a reason for deprecation, wouldn't it serve us better to undo the deprecation, remove the bad expression for the default, and say it's up to tools to choose a suitable alignment?