问题描述
- mxgraph看下自定义 线样式代码
-
帮我看下代码。如何设置线不重叠
graph.stylesheet.getDefaultEdgeStyle()[mxConstants.STYLE_EDGE] =
mxEdgeStyle.MyStyle = function(state, source, target, points, result)
{
if (source != null && target != null)
{
var pt = new mxPoint(target.getCenterX(), source.getCenterY());if (mxUtils.contains(source, pt.x, pt.y)) { pt.y = source.y + source.height; } result.push(pt); } };
解决方案
线重叠, 应该是坐标有错.
把坐标输出, 看是否有重叠的可能.
时间: 2025-01-30 18:32:05