wangduanduan / jsplumb-chinese-tutorial

jsplumb中文教程, README中没有的内容,可以查看项目的Wiki。有问题提issue
https://github.com/wangduanduan/jsplumb-chinese-tutorial/wiki
1.3k stars 249 forks source link

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

Closed SophieRoyal closed 5 years ago

SophieRoyal commented 5 years ago

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: '',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)

wangduanduan commented 5 years ago

学习overlay, 先看demo2.6 https://github.com/wangduanduan/jsplumb-chinese-tutorial#26-%E7%BB%99%E8%BF%9E%E6%8E%A5%E5%8A%A0%E4%B8%8A%E7%AE%AD%E5%A4%B4