This class represents the size of an object.
Remarks
An instance of this class implements the immutable design pattern.
Type Details
- yfiles module
- algorithms
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.algorithms.YDimension
See Also
Constructors
Properties
Methods
Compares this object to the given object of the same type.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- o - Object
- The object to compare this to.
Returns
- ↪number
- -1: this is less than
obj
- 0: this is equal to
obj
- 1: this is greater than
obj
- -1: this is less than
Implements
Tests a dimension to equality to another dimension.
Returns a hash code for this object.
Remarks
The hash code is a numeric value that can be used to treat this object as a key in a hash table or similar data structure.
Two objects that are considered equal must have the same hash code. However, the reverse does not hold and two objects having the same hash code don't have to be equal. Ideally, the hash code should be roughly uniformly-distributed to prevent hash tables from performing poorly. Calculating the hash code is also a potentially frequent operation and should therefore be fast.
Returns
- ↪number
- the hash code for this object
Creates a Size from a given YDimension.
Returns
This method is not available unless the module view-layout-bridge is loaded. Either load the module 'view-layout-bridge' explicitly or call
Class.ensure(LayoutExecutor)
More information.