源码修改来源:
http://t.csdnimg.cn/7Cuvb
问题描述:业务需求和设计给的图是
jsmind0.8.5找到es6/jsmind.js找到class f straight直线和curved曲线,
我是修改的curved: this._brokenline_to
//用直角画线方式 取得是两点中间的距离
_brokenline_to(ctx, x1, y1, x2, y2) {
ctx.beginPath();
// y1,y2横向连线下移
ctx.moveTo(x1, y1 - 5);
ctx.lineTo(x1 + (x2 - x1) / 2, y1 - 5);
ctx.lineTo(x1 + (x2 - x1) / 2, y2 - 5); //(x2-x1)/2控制横向连线的长度,延长了一半
ctx.lineTo(x2 - 5, y2 - 5); //连线靠近缩放小圆点
ctx.stroke();
}