jgraph / mxgraph

mxGraph is a fully client side JavaScript diagramming library
Other
6.79k stars 2.06k forks source link

Rotated Label and Vertical Label Positioning result in weird behavior #484

Closed nrauschcom closed 3 years ago

nrauschcom commented 4 years ago

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:

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.