@aurigma/design-atoms-model 7.0.38 → 7.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,6 +3,9 @@ export declare class MaxArtworkSizeConstraints {
|
|
|
3
3
|
width: number | null;
|
|
4
4
|
height: number | null;
|
|
5
5
|
shapeType: ArtworkShapeType | null;
|
|
6
|
+
get isCircle(): boolean;
|
|
7
|
+
get isEllipse(): boolean;
|
|
8
|
+
get isRectangle(): boolean;
|
|
6
9
|
protected _copy(source: MaxArtworkSizeConstraints, destination: MaxArtworkSizeConstraints): void;
|
|
7
10
|
clone(): MaxArtworkSizeConstraints;
|
|
8
11
|
toJSON(): {
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
import { EqualsOfFloatNumbers } from "../../Math";
|
|
1
2
|
export class MaxArtworkSizeConstraints {
|
|
2
3
|
constructor() {
|
|
3
4
|
this.width = null;
|
|
4
5
|
this.height = null;
|
|
5
6
|
this.shapeType = null;
|
|
6
7
|
}
|
|
8
|
+
get isCircle() {
|
|
9
|
+
const isEllipse = this.shapeType === "ellipse";
|
|
10
|
+
const isEqualSides = EqualsOfFloatNumbers(this.width, this.height);
|
|
11
|
+
return isEllipse && isEqualSides;
|
|
12
|
+
}
|
|
13
|
+
get isEllipse() {
|
|
14
|
+
const isEllipse = this.shapeType === "ellipse";
|
|
15
|
+
const isNotEqualSides = this.width != this.height;
|
|
16
|
+
return isEllipse && isNotEqualSides;
|
|
17
|
+
}
|
|
18
|
+
get isRectangle() {
|
|
19
|
+
return this.shapeType == "rectangle";
|
|
20
|
+
}
|
|
7
21
|
_copy(source, destination) {
|
|
8
22
|
destination.width = source.width != null ? source.width : null;
|
|
9
23
|
destination.height = source.height != null ? source.height : null;
|
|
10
|
-
destination.shapeType = source.shapeType
|
|
24
|
+
destination.shapeType = source.shapeType;
|
|
11
25
|
}
|
|
12
26
|
clone() {
|
|
13
27
|
const constraints = new MaxArtworkSizeConstraints();
|
|
@@ -18,7 +32,7 @@ export class MaxArtworkSizeConstraints {
|
|
|
18
32
|
return {
|
|
19
33
|
width: this.width,
|
|
20
34
|
height: this.height,
|
|
21
|
-
shapeType: this.shapeType
|
|
35
|
+
shapeType: this.shapeType,
|
|
22
36
|
};
|
|
23
37
|
}
|
|
24
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaxArtworkSizeConstraints.js","sourceRoot":"","sources":["../../../../src/design-atoms-model/Product/Constraints/MaxArtworkSizeConstraints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MaxArtworkSizeConstraints.js","sourceRoot":"","sources":["../../../../src/design-atoms-model/Product/Constraints/MaxArtworkSizeConstraints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIlD,MAAM,OAAO,yBAAyB;IAAtC;QACI,UAAK,GAAkB,IAAI,CAAC;QAC5B,WAAM,GAAkB,IAAI,CAAC;QAC7B,cAAS,GAA4B,IAAI,CAAC;IAwC9C,CAAC;IAtCG,IAAI,QAAQ;QACR,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC;QAC/C,MAAM,YAAY,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACnE,OAAO,SAAS,IAAI,YAAY,CAAC;IACrC,CAAC;IAED,IAAI,SAAS;QACT,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC;QAC/C,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC;QAClD,OAAO,SAAS,IAAI,eAAe,CAAC;IACxC,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,SAAS,IAAI,WAAW,CAAC;IACzC,CAAC;IAES,KAAK,CACX,MAAiC,EACjC,WAAsC;QAEtC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/D,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAClE,WAAW,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAC7C,CAAC;IAED,KAAK;QACD,MAAM,WAAW,GAAG,IAAI,yBAAyB,EAAE,CAAC;QACpD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC9B,OAAO,WAAW,CAAC;IACvB,CAAC;IAED,MAAM;QACF,OAAO;YACH,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC;IACN,CAAC;CACJ"}
|
package/Version.d.ts
CHANGED
package/Version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.0.
|
|
2
|
+
"version": "7.0.39",
|
|
3
3
|
"name": "@aurigma/design-atoms-model",
|
|
4
4
|
"license": "SEE LICENSE IN License.md",
|
|
5
5
|
"description": "Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.",
|