mxGraph 的核心函数,包括mxGraph.insertVertex()和 mxGraph.insertEdge()
本篇文章来讲解mxGraph.insertEdge的参数,若有其他的不明白,可以留言,或者看其他博文
mxGraph.insertEdge(parent, id, value, source, target, style)
mxGraph.insertEdge(父级,id,值,源,目标,样式)
1:parent - 作为结构中新单元的直接父级单元
2:id - mxGraph.insertVertex 函数中的ID一样,一般情况下传null,这样模型将管理ID并确保他们是唯一的
3:value - 指的是你所创建的连线上边的标注
4:source - 指的是你创建的连线从哪个 cell 开始,
5:target - 你所创建的连线指向哪个 cell
6:style - 样式