Link
A single line link.
SVG selectors​
Supported attrs
properties:
Selector | Node | Description |
---|---|---|
root | SVGGElement | Container of all nodes |
line | SVGPathElement | Visible connection of the link |
wrapper | SVGPathElement | Invisible wrapper around the connection to make the line thicker, so the user can interact with the link more easily |
const link = new shapes.standard.Link();
link.prop('source', { x: 450, y: 600 });
link.prop('target', { x: 400, y: 750 });
link.prop('vertices', [{ x: 450, y: 700 }]);
link.attr('root/title', 'shapes.standard.Link');
link.attr('line/stroke', '#fe854f');