如果没看过JsPlumb使用心得(1)的可先查看初始教程 JsPlumb(1)
7.事件
// 请单点击一下连接线,
jsPlumb.bind('click', function (conn, originalEvent) {
alert('点击了线')
})
jsPlumb Events列表 官方事件文件
- connection
- connectionDetached
- connectionMoved
- click //单击
- dblclick //双击
- endpointClick
- endpointDblClick
- contextmenu
- beforeDrop //连接前
- beforeDetach //断开连接前
- zoom
- Connection Events
- Endpoint Events
- Overlay Events
- Unbinding Events
8.删除节点
jsPlumb.bind('click', function (conn, originalEvent) {
jsPlumb.remove(conn.targetId+'') //id
})
9.编码连接endPoint(通过uuids)