wangduanduan / jsplumb-chinese-tutorial

jsplumb中文教程, README中没有的内容,可以查看项目的Wiki。有问题提issue

Home Page:https://github.com/wangduanduan/jsplumb-chinese-tutorial/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.3.4. Overlays这里的demo是否有问题

SophieRoyal opened this issue · comments

1.3.4. Overlays [todo]
1.3.4. Overlays这里的demo我参照了。但是没有效果,也没有报错
jsPlumb.connect({//画板初始化,线连接初始化
source: 'item_center',//连接线头部
target: 'item_right',//连接线尾部
anchor: ['Left', 'TopCenter'],//连接点在当前元件的部位:上下左右方位。
paintStyle: { stroke: 'red', strokeWidth: 5 },//线条设置
connectorOverlays: [ ['Arrow', { width: 20,length: 20,location: 0.5 }],
['Label', {label: 'Xxxxxxxx',cssClass: '',
labelStyle: {color: 'red'},
events: {
click: function (labelOverlay, originalEvent) {
console.log('click on label overlay for :' + labelOverlay.component)
console.log(labelOverlay)
console.log(originalEvent)
}
}
}]
],//设置箭头
endpointStyle: { fill: '#225588', outlineStroke: 'darkgray', outlineWidth: 300 }//节点的的颜色等设置
},common)