0

我在这里编辑 digrameditor !对于我自己的项目,我需要将顶点的标签定位到底部。我尝试通过添加跟随更改,但似乎并非如此。

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

有什么帮助吗?

谢谢。

4

1 回答 1

0

经过更多研究后,我发现可以使用位于config目录中的diagrameditor.xml文件来完成。您可以在第 123 行找到定义为样式表的 mxStylesheet ,在它们中您可以找到defaultVertex样式。将verticalAlign属性更改为bottom,如下所示。

...
<add as="align" value="left"/>
<add as="verticalAlign" value="bottom"/>
<add as="shadow" value="0"/>
....
于 2017-01-05T10:16:28.937 回答