редактор диаграмм mxGraph изменить положение метки

Я редактирую редактор диграмм здесь! для моего собственного проекта, и мне нужно расположить метки вершин внизу. Я попытался добавить последующие изменения, но, похоже, это не так.

....
// Program starts here. The document.onLoad executes the
// mxApplication constructor with a given configuration.
// In the config file, the mxEditor.onInit method is
// overridden to invoke this global function as the
// last step in the editor constructor.
function onInit(editor)
{
     // Set align of the labels to bottom
     mxConstants.STYLE_VERTICAL_LABEL_POSITION = mxConstants.ALIGN_BOTTOM;
....

Любая помощь?

Спасибо.


person Vihanga Liyanage    schedule 03.01.2017    source источник


Ответы (1)


После дополнительных исследований я обнаружил, что это можно сделать с помощью файла diagrameditor.xml, который находится в папке config. Вы можете найти таблицу mxStylesheet, определенную как stylesheet в строке 123, и в ней вы можете найти стиль defaultVertex. Измените атрибут verticalAlign на bottom следующим образом.

...
<add as="align" value="left"/>
<add as="verticalAlign" value="bottom"/>
<add as="shadow" value="0"/>
....
person Vihanga Liyanage    schedule 05.01.2017