Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Overlay arrow to endpoint doesn't work

I'm using this makeSource code and add endpoint styling according to the 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}],
    ],
});

I'm not getting errors.

Overlay


1 Answers

Updated FIDDLE

For jsPlumb.makeSource() the attribute name is connectorOverlays(SOURCE). Here is sample code:

jsPlumb.makeSource("someDiv", {
...
endpoint:{
   connectorOverlays:[ 
     [ "Arrow", { width:10, length:30, location:1, id:"arrow" } ], 
     [ "Label", { label:"foo", id:"label" } ]
   ]
}
...
});

OR, You can set it in defaults as:

jsPlumb.Defaults.Overlays = [
            [ "Arrow", { 
                location:1,
                id:"arrow",
                length:14,
                foldback:0.8
            } ]
];
like image 66
MrNobody007 Avatar answered Dec 16 '25 01:12

MrNobody007



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!