Constructors
constructor
- new Size(width, height): Size
Parameters
width: number
height: number
Methods
isPortrait
- isPortrait(): boolean
Returns boolean
ratio
- ratio(heightBased?): number
Parameters
Optional
heightBased: boolean
Returns number
ratioDiff
- ratioDiff(other, heightBased?): number
Parameters
Optional
heightBased: boolean
Returns number
Static
fromHtmlElement
- fromHtmlElement(element): Size
Static
fromJson
- fromJson(json): Size
Parameters
json: {
height: number;
width: number;
}
height: number
width: number
Static
isEmpty
- isEmpty(size): boolean
Returns boolean
Static
subtractFrom
- subtractFrom(original, amount): Size
Parameters
original: Size
amount: number