jointjs
Version:
JavaScript diagramming library
24 lines (21 loc) • 959 B
HTML
<p>Adds a stroke around an arbitrary cell view's SVG node.</p>
<p>Available options:</p>
<ul>
<li><b>layer</b> - the stacking order of the highlighter. See <a href="#dia.HighlighterView.prototype.options.layer">dia.Highlighter</a> for supported values.</li>
<li><b>padding</b> - the space between the stroke and the element</li>
<li><b>rx</b> - the stroke's border radius on the x-axis</li>
<li><b>ry</b> - the stroke's border radius on the y-axis</li>
<li><b>attrs</b> - an object with SVG attributes to be set on the highlighter element</li>
<li><b>useFirstSubpath</b> - draw the stroke by using the first subpath of the target <code>el</code> compound path.</li>
</ul>
<p>Example usage:</p>
<pre><code>joint.highlighters.stroke.add(cellView, 'body', 'my-highlighter-id', {
padding: 10,
rx: 5,
ry: 5,
useFirstSubpath: true,
attrs: {
'stroke-width': 3,
'stroke': '#FF0000'
}
});</code></pre>