我正在使用此 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}],
],
});
我没有收到错误。
最佳答案
已更新 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
} ]
];
关于javascript - 向端点添加叠加箭头不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22766565/