OutputRestrictions restrict the output area and the shape of a layout in conjunction with organic layout algorithms such as OrganicLayout or InteractiveOrganicLayout.
Remarks
Type Details
- yfiles module
- layout-organic
- yfiles-umd modules
- layout-multipage, layout-organic, layout
- Legacy UMD name
- yfiles.organic.OutputRestriction
See Also
Constants
This OutputRestriction does not restrict the output by any means.
Remarks
See Also
Static Methods
Creates an OutputRestriction that confines the layout result to a rectangular area which roughly complies with the given aspect ratio.
Remarks
The aspect ratio is defined as the ratio between the width and the height of a layout.
- aspect ratio 1: width and height of the layout should be equal
- aspect ratio between 0 and 1: the height of a layout should be greater than its width
- aspect ratio larger than 1: the width of a layout should be greater than its height
The aspect ratio needs to be strictly positive.
Parameters
A map of options to pass to the method.
- ratio - number
- the preferred aspect ratio of the output
Returns
- ↪OutputRestriction
- an OutputRestriction imposing the given aspect ratio on the layout
Throws
- Exception({ name: 'ArgumentError' })
- if the given aspect ratio is
0
or negative
See Also
Sample Graphs
Creates an OutputRestriction that confines the layout result to a circle.
Remarks
The actual restriction circle is defined by the given coordinates and radius.
The radius of the restriction circle needs to be greater than zero.
Parameters
A map of options to pass to the method.
- x - number
- the x-coordinate of the restriction circle's center
- y - number
- the y-coordinate of the restriction circle's center
- radius - number
- the radius of the restriction circle
Returns
- ↪OutputRestriction
- the OutputRestriction confining the layout to a circular area
Throws
- Exception({ name: 'ArgumentError' })
- if the given radius is less than or equal to zero
See Also
Sample Graphs
Creates an OutputRestriction that confines the layout result to an elliptical area.
Remarks
The restriction ellipse is defined by its bounding box specified by the given coordinates and size values.
The main axes of the ellipse are parallel to the coordinate axes.
The values for height and width of the ellipse's bounding box need to be greater than zero.
Parameters
A map of options to pass to the method.
- x - number
- the x-coordinate of the bounding box's upper left corner
- y - number
- the y-coordinate of the bounding box's upper left corner
- w - number
- the width of the bounding box
- h - number
- the height of the bounding box
Returns
- ↪OutputRestriction
- the OutputRestriction confining the layout to an elliptical area
Throws
- Exception({ name: 'ArgumentError' })
- if the given width or height is
0
or negative
See Also
Sample Graphs
Creates an OutputRestriction that confines the layout to a rectangular area.
Remarks
This restriction rectangle is defined by the given coordinates and size values.
The values for height and width of the rectangle need to be greater than zero.
Parameters
A map of options to pass to the method.
- x - number
- the x-coordinate of the restriction rectangle's upper-left corner
- y - number
- the y-coordinate of the restriction rectangle's upper-left corner
- w - number
- width of the restriction rectangle
- h - number
- height of the restriction rectangle
Returns
- ↪OutputRestriction
- the OutputRestriction confining the layout to a rectangular area
Throws
- Exception({ name: 'ArgumentError' })
- if the given width or height is less than or equal to zero