@routevn/creator-model 1.1.10 → 1.1.11
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.
- package/package.json +1 -1
- package/src/model.js +12 -0
package/package.json
CHANGED
package/src/model.js
CHANGED
|
@@ -2474,6 +2474,7 @@ const validateLayoutElementData = ({
|
|
|
2474
2474
|
"y",
|
|
2475
2475
|
"width",
|
|
2476
2476
|
"height",
|
|
2477
|
+
"aspectRatioLock",
|
|
2477
2478
|
"anchorX",
|
|
2478
2479
|
"anchorY",
|
|
2479
2480
|
"scaleX",
|
|
@@ -2574,6 +2575,16 @@ const validateLayoutElementData = ({
|
|
|
2574
2575
|
}
|
|
2575
2576
|
}
|
|
2576
2577
|
|
|
2578
|
+
if (
|
|
2579
|
+
data.aspectRatioLock !== undefined &&
|
|
2580
|
+
(!isFiniteNumber(data.aspectRatioLock) || data.aspectRatioLock <= 0)
|
|
2581
|
+
) {
|
|
2582
|
+
return invalidFromErrorFactory(
|
|
2583
|
+
errorFactory,
|
|
2584
|
+
`${path}.aspectRatioLock must be a finite number greater than 0 when provided`,
|
|
2585
|
+
);
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2577
2588
|
if (
|
|
2578
2589
|
data.initialValue !== undefined &&
|
|
2579
2590
|
!isFiniteNumber(data.initialValue) &&
|
|
@@ -2959,6 +2970,7 @@ const validateLayoutElementItems = ({ items, path, errorFactory }) => {
|
|
|
2959
2970
|
"y",
|
|
2960
2971
|
"width",
|
|
2961
2972
|
"height",
|
|
2973
|
+
"aspectRatioLock",
|
|
2962
2974
|
"anchorX",
|
|
2963
2975
|
"anchorY",
|
|
2964
2976
|
"scaleX",
|