我正在尝试将我们自定义格式的图表导入 mxgraph,但我坚持在连接器上设置点。我试过调用 mxEdgeStyle 中的函数,例如 ElbowConnector :
ElbowConnector(view.getState(edge), model.getSource(edge), model.getTarget(edge), points)
其中 points 是我要设置的点数组。我觉得我调用了完全错误的函数,还是我使用不正确?
最佳答案
边缘样式与其他键/值样式一样。在您提供的 API 规范链接中,最上面的示例告诉您如何使用它:
var style = stylesheet.getDefaultEdgeStyle();
style[mxConstants.STYLE_EDGE] = mxEdgeStyle.ElbowConnector;
关于javascript - 在 mxgraph 中设置连接器(边缘)点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22038077/