Skip to main content

Boundary

The Boundary 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:

paddingnumber|objectThis option determines whether the boundary area should be visually inflated and if so, by how much. Default is 10 ({ left: 10, top: 10, right: 10, bottom: 10 }).
rotatebooleanShould the boundary rotate according to the element angle? Default is false.
useModelGeometrybooleanIf this option is set to true, the position of the boundary is calculated based on the dimensions of the element model.

Example:

var boundaryTool = new joint.elementTools.Boundary({
focusOpacity: 0.5,
padding: 20,
useModelGeometry: true
});