Menu

#34 Arrow label

v6.x
wont-fix
block (6)
5
2021-08-05
2018-11-21
No

Arrow label placement is inconsistent, see attached PNG with block csource code. I suppose all "Uu" labels should have placed similarly, while two labels out of the three are skewed to the left instead.

1 Attachments

Discussion

  • Zoltán Turányi

    • labels: --> block
    • assigned_to: Zoltán Turányi
     
  • Zoltán Turányi

    Thanks for reporting the bug.
    Unfortunately I cannot find the source code embedded in the image. Could you please attach it, as well?

     
  • Zoltán Turányi

    This is by design. Left or right slanting lines/arrows have the bottom right and bottom left corner of the label aligned to the middle of the line/arrow, respectively. See this diagram:

    boxcol A { box A, B, C; }
    space 20;
    box D [ymiddle=B-5];
    D--A.A, A.B, A.C: F [marker.type=diamond, marker.color=red, text.bgcolor=lgray];
    (A.A+D, A.A)..(A.A+D,A.C) [color=red+60];
    

    The markers show, which part of the line the label is positioned. As you can see the three lines have their markers fully aligned. But you can also observeon the highlighted label backgrounds (light gray) that different slants of the arrow make different corner of the label to align.
    If you remove the -5 from line #3 you will see that the middle line will be completely horizontal and its label will now be centered to the marker.

    I have no easy way to tell you on how to produce completely aligned labels in this situation. Sorry.
    Maybe "label.pos=center" This will place the labels onto the marker and will end up aligned - but on the line.

     

    Last edit: Zoltán Turányi 2021-08-05
  • Zoltán Turányi

    • status: open --> wont-fix
     
MongoDB Logo MongoDB