-
Notifications
You must be signed in to change notification settings - Fork 1
/
MPIconSize.ts
39 lines (37 loc) · 896 Bytes
/
MPIconSize.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import MPSize from "./MPSize";
/**
* Class to hold height and width information for an icon.
*
* @export
* @class MPIconSize
* @typedef {MPIconSize}
* @implements {MPSize}
*/
export default class MPIconSize implements MPSize {
/**
* Creates an instance of MPIconSize.
*
* @constructor
* @private
* @param {number} height The height measure.
* @param {number} width The width measure.
*/
private constructor(
public readonly height: number,
public readonly width: number
) { }
/**
* Creator for MPIconSize, used to decode JSON from the MapsIndoors SDK.
*
* @public
* @static
* @param {MPSize} object
* @returns {MPIconSize}
*/
public static create(object: MPSize): MPIconSize {
return new MPIconSize(
object?.height,
object?.width,
);
}
}