achuanle / umlet

Automatically exported from code.google.com/p/umlet
0 stars 0 forks source link

Arrow text is not centered vertically #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please make arrow text to be centered vertically. It makes no sence to start it 
from the center of an arrow

Original issue reported on code.google.com by glago...@gmail.com on 5 Feb 2015 at 8:33

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Maybe this could be solved by making the valign and halign tags work on edges 
too? Then we cood choose which side of the line the text is placed on. Default 
could be centered in the direction of the arrow.

Original comment by fropet...@gmail.com on 6 Feb 2015 at 8:03

GoogleCodeExporter commented 9 years ago
I tried valign tag - not recognized on arrows

Original comment by glago...@gmail.com on 6 Feb 2015 at 8:33

GoogleCodeExporter commented 9 years ago
I know; I meant it as a suggestion for the devs.

Maybe this is because of text alignment when the same arrow is placed 
horizontally; the text is centered along the arrow, but the first line is 
placed above it and the rest below. It seems to me that the text block is fixed 
vertically relative to the arrow center. This might be in order to avoid text 
being _on_ the arrow which would be hard to read. Just a guess.

Still, the horizontal alignment changes from being centered to being placed to 
the right side when changing direction, so it should be possible to change the 
vertical alignment at the same time. 

Enabling the valign/halign tags for this kind of text field would be practical 
too, but maybe that should be a separate request?

Original comment by fropet...@gmail.com on 6 Feb 2015 at 4:46

GoogleCodeExporter commented 9 years ago
Great idea! 

Original comment by glago...@gmail.com on 6 Feb 2015 at 4:55

GoogleCodeExporter commented 9 years ago
Hi

Thanks for the report, the text should be centered (and will be with the next 
release) as you can see in the attached png example

fixed in r1316

Original comment by AFDiaX on 6 Feb 2015 at 5:56

Attachments:

GoogleCodeExporter commented 9 years ago
just a short note to the last comment:

text placement for relations is quite complex and the calculation for 
horizontal and vertical lines is different so they do not influence each other 
(I guess the horizontal logic with first line of text above, rest below the 
relation line is OK)

halign and valign do not work because they would be hard to implement in a way 
which always looks good (because of all the combinations of relation-line 
alignment, amount of text lines, ...)

Original comment by AFDiaX on 6 Feb 2015 at 6:02