jgraph/mxgraph

Rotated Label and Vertical Label Positioning result in weird behavior

nrauschcom opened this issue · 0 comments

When setting a label to horizontal=0 and using the positioning dropdown, the label is in weird positions which can not be described by the applied style values.

image

In the example, the label is positioned as "bottom", resulting in a style string of horizontal=0;labelPosition=center;verticalLabelPosition=bottom

This should result in one of the following graphical respresentations:

  • below the node, if we apply the normal view, which would make sense to me and most likely to the user
  • to the right of the node, if we apply the already rotated view (like for text alignment inside of the label)

As you can see, the label is instead aligned to the top of the node, which is absolutely unexpected.

Same thing appears to happen for verticalLabelPosition=top, which is drawing the label on the bottom. Since left and right are working as expected, I guess there's just a simple bug in the rendering code.