UNPKG

jointjs

Version:

JavaScript diagramming library

22 lines (18 loc) 958 B
<p> If <code>true</code>, set the shape of the subelement to match the shape of the LinkView (set the <code>'d'</code> attribute to the result of the link connector). It's valid only for <code>SVGPathElement</code> within the LinkView context. </p> <p>You can also provide an object with the following options:</p> <table> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> <tr> <td>stubs</td> <td><i>Number</i></td> <td>If provided, display only the beginning and end stubs of the connection and hide the remaining central section. A positive value determines the length of each stub. If the value is negative, it determines the length of the hidden section of the connection between the two stubs.</td> </tr> </table> <pre><code>link1.attr('pathSelector', { connection: true, stroke: 'red', fill: 'none' }); link2.attr('pathSelector', { connection: { stubs: -20 }});</code></pre>