Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/377.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript mxGraph Diagram编辑器更改标签位置_Javascript_Jgraph_Mxgraph - Fatal编程技术网

Javascript mxGraph Diagram编辑器更改标签位置

Javascript mxGraph Diagram编辑器更改标签位置,javascript,jgraph,mxgraph,Javascript,Jgraph,Mxgraph,我正在编辑中的digrameditor!对于我自己的项目,我需要将顶点的标签定位到底部。我尝试添加follow更改,但似乎不是这样 .... // Program starts here. The document.onLoad executes the // mxApplication constructor with a given configuration. // In the config file, the mxEditor.onInit method is // overridde

我正在编辑中的digrameditor!对于我自己的项目,我需要将顶点的标签定位到底部。我尝试添加follow更改,但似乎不是这样

....
// 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;
....
有什么帮助吗


谢谢。

经过进一步研究,我发现可以使用目录中的diagrameditor.xml文件来完成。您可以在第123行找到定义为样式表的mxStylesheet,在它们的中可以找到defaultVertex样式。将垂直对齐属性更改为底部,如下所示

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