UNPKG

jointjs

Version:

JavaScript diagramming library

28 lines (24 loc) 1.11 kB
<p>The <code>Boundary</code> element tool renders a rectangular border to show the bounding box of the element. It accepts a few additional arguments, which can be passed as an object to the element tool constructor:</p> <table> <tr> <th>padding</th> <td><i>number|object</i></td> <td>This option determines whether the boundary area should be visually inflated and if so, by how much. Default is <code>10</code> (<code>{ left: 10, top: 10, right: 10, bottom: 10 }</code>).</td> </tr> <tr> <th>rotate</th> <td><i>boolean</i></td> <td>Should the boundary rotate according to the element angle? Default is <code>false</code>.</td> </tr> <tr> <th>useModelGeometry</th> <td><i>boolean</i></td> <td>If this option is set to <code>true</code>, the position of the boundary is calculated based on the dimensions of the element model.</td> </tr> </table> <p>Example:</p> <pre><code>var boundaryTool = new joint.elementTools.Boundary({ focusOpacity: 0.5, padding: 20, useModelGeometry: true });</code></pre>