jointjs
Version:
JavaScript diagramming library
11 lines (9 loc) • 691 B
HTML
<p>Valid for <code><path></code> subelements. It draws an SVG element at the beginning of a path. The element is automatically rotated based on the path direction.
It's defined as an object with <code>type</code> property and any other visual attributes. The valid values for <code>type</code> are <code>'path'</code>, <code>'circle'</code>, <code>'ellipse'</code>, <code>'rect'</code>, <code>'polyline'</code> and <code>'polygon'</code>.
<pre><code>link.attr('.connection/sourceMarker', {
type: 'circle', // SVG Circle
fill: '#666',
stroke: '#333',
r: 5, // radius of the circle
cx: 5 // move the centre of the circle 5 pixels from the end of the path
});</code></pre>