A horizontal or vertical Interval that additionally stores a y- (in the horizontal case) or x-coordinate (in the vertical case).
Remarks
Type Details
- yfiles module
- router-polyline
- yfiles-umd modules
- layout-area, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-polyline
- Legacy UMD name
- yfiles.router.OrthogonalInterval
See Also
Constructors
Creates a new OrthogonalInterval instance using the from
and to
value as interval bounds.
Parameters
A map of options to pass to the method.
- from - number
- the start of the interval bounds
- to - number
- the end of the interval bounds
- location - number
- the location in the two-dimensional coordinate system
- isVertical - boolean
true
if the orthogonal interval is vertical,false
if it is horizontal
Throws
- Exception({ name: 'ArgumentError' })
- if the given range is
null
Creates a new OrthogonalInterval instance with the given interval bounds.
Parameters
A map of options to pass to the method.
- range - Interval
- the given range
- location - number
- the location in the two-dimensional coordinate system
- isVertical - boolean
true
if the orthogonal interval is vertical,false
if it is horizontal
Throws
- Exception({ name: 'ArgumentError' })
- if the given range is
null
Properties
Gets the center of this orthogonal interval in the 2D-coordinate system.
Gets the upper bound of the orthogonal interval.
Gets the lower bound of the orthogonal interval.
Gets the range of this orthogonal interval.
Gets the length of the orthogonal interval.
See Also
Gets whether or not the orthogonal interval is oriented vertically.
Methods
Checks whether or not this orthogonal interval is fully covered by the given orthogonal interval.
Remarks
Parameters
A map of options to pass to the method.
- other - OrthogonalInterval
- the other orthogonal interval
Returns
- ↪boolean
true
if this orthogonal interval is fully covered by the other orthogonal interval,false
otherwise
Throws
- Exception({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
Determines whether or not this orthogonal interval crosses the given one.
Remarks
Parameters
A map of options to pass to the method.
- other - OrthogonalInterval
- the other orthogonal interval
Returns
- ↪boolean
true
if this orthogonal interval crosses the given one,false
otherwise
Throws
- Exception({ name: 'ArgumentError' })
- if the given orthogonal intervals have the same orientation
Returns the distance of the ranges of this orthogonal interval and the given orthogonal interval.
Remarks
Parameters
A map of options to pass to the method.
- other - OrthogonalInterval
- the other orthogonal interval
Returns
- ↪number
0
if the orthogonal intervals intersect each other, otherwise the minimal distance between the orthogonal intervals is returned
Throws
- Exception({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
Checks whether or not this orthogonal interval and the given orthogonal interval cover the same range.
Remarks
Parameters
A map of options to pass to the method.
- other - OrthogonalInterval
- the other orthogonal interval
Returns
- ↪boolean
true
if the orthogonal intervals cover the same range,false
otherwise
Throws
- Exception({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
Checks whether or not this orthogonal interval intersects the given orthogonal interval and the intersection has a given minimum intersection size.
Remarks
Parameters
A map of options to pass to the method.
- other - OrthogonalInterval
- the other orthogonal interval
- minIntersection - number
- the minimum size of the intersection
Returns
- ↪boolean
true
if this interval intersects the given other orthogonal interval,false
otherwise
Throws
- Exception({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
Returns the Manhattan distance of this orthogonal interval and the given orthogonal interval.
Remarks
If both intervals have the same orientation, the Manhattan distance is the sum of the distance between the intervals' ranges and the distance between the intervals' locations.
If the intervals have different orientations, the Manhattan distance is the sum of the distances between one interval's range and the other interval's location.
Parameters
A map of options to pass to the method.
- other - OrthogonalInterval
- the other orthogonal interval
Returns
- ↪number
- the Manhattan distance between this interval and the given one
Returns a string representation of this OrthogonalInterval object.
Returns
- ↪string
- a string representation of this OrthogonalInterval object
Static Methods
Calculates the intersection of the given orthogonal intervals.
Remarks
i2
and the shared vertical range of both intervals. If it is horizontal, it will have the same vertical location as i2
and the shared horizontal range of both intervals. The orthogonal intervals must have same orientation.Parameters
A map of options to pass to the method.
- i1 - OrthogonalInterval
- the first orthogonal interval
- i2 - OrthogonalInterval
- the second orthogonal interval
Returns
- ↪OrthogonalInterval
- the shared orthogonal interval of both given orthogonal intervals
Throws
- Exception({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
Calculates the union of the given orthogonal intervals.
Remarks
i2
and the shared vertical range of both orthogonal intervals. If it is horizontal, it will have the same vertical location as i2
and the shared vertical range of both orthogonal intervals. The orthogonal intervals must have same orientation.Parameters
A map of options to pass to the method.
- i1 - OrthogonalInterval
- the first orthogonal interval
- i2 - OrthogonalInterval
- the second orthogonal interval
Returns
- ↪OrthogonalInterval
- the union of both given orthogonal intervals
Throws
- Exception({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations