我正在使用此makeSource
代码并根据docs添加端点样式:
jsPlumb.makeSource(connect, {
parent: newEntity,
anchor: 'Continuous',
connector: 'Flowchart',
paintStyle: {
fillStyle: 'rgba(123, 123, 123, 1)',
radius: 1,
},
overlays:[
['Arrow', {width: 10, length: 30, location: 1}],
],
});
我没有收到错误。
答案 0 :(得分:6)
更新了 FIDDLE
对于jsPlumb.makeSource()
,属性名称为connectorOverlays
( SOURCE )。以下是示例代码:
jsPlumb.makeSource("someDiv", {
...
endpoint:{
connectorOverlays:[
[ "Arrow", { width:10, length:30, location:1, id:"arrow" } ],
[ "Label", { label:"foo", id:"label" } ]
]
}
...
});
或者,您可以将其设置为默认值:
jsPlumb.Defaults.Overlays = [
[ "Arrow", {
location:1,
id:"arrow",
length:14,
foldback:0.8
} ]
];