The Boundary element tool renders a rectangular border to show the bounding box of the element. It accepts a few additional argument, which can be passed as an object to the element tool constructor:

padding number|object This 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 }).
rotate boolean Should the boundary rotate according to the element angle? Default is false.
useModelGeometry boolean If 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
});