jointjs
Version:
JavaScript diagramming library
7 lines (4 loc) • 694 B
HTML
<pre class="docs-method-signature"><code>V(svg)</code></pre>
<p>Return a Vectorizer object. If <code>svg</code> parameter is a string, construct SVG DOM elements from the string markup. If <code>svg</code> is an SVG DOM element, just wrap that element by the Vectorizer object and return it. You can think of this function as of the <a href="http://api.jquery.com/jQuery/">jQuery $</a> function except that the <code>V</code> function does not accept selectors. The Vectorizer object contains a reference to the original SVG DOM element in its <b><code>node</code></b> property.</p>
<pre><code>var vel = V('<g><rect/><text/></g>');
console.log(vel.node);</code></pre>