2017-01-03 38 views
0

Ich bearbeite den Digrameditor in here! für mein eigenes Projekt und ich muss die Labels der Vertices nach unten positionieren. Ich habe versucht, die folgenden Änderungen hinzuzufügen, aber es scheint nicht der Fall zu sein.mxGraph diagrameditor Position ändern

.... 
// 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; 
.... 

Irgendwelche Hilfe?

Danke.

Antwort

0

Nach einiger mehr Forschung fand ich heraus, dass es die diagrameditor.xml Datei im config Verzeichnis lokalisiert getan werden kann. Sie können das mxStylesheet als Stylesheet in Zeile 123 finden und in ihrem können Sie die defaultVertex Stil finden. Ändern Sie das verticalAlign Attribut zu unten wie folgt.

... 
<add as="align" value="left"/> 
<add as="verticalAlign" value="bottom"/> 
<add as="shadow" value="0"/> 
....