由于产品的功能需要,需要在连接两个node的port时发送一个请求,那连接两个port时的鼠标抬起动作很重要,但是mouseup肯定是不行的,那解决方案是什么呢,请见下面:
graph.on('change:source change:target', function (link) {
if (link.get('source').id && link.get('target').id) {
// both ends of the link are connected.
...
}
})
接下来准备分享一下jointjs结合拖拽的小demo,敬请期待,嘿嘿!