seat-editor 3.5.10 → 3.5.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.
|
@@ -60,9 +60,14 @@ export const getSeatPosition = (shape, props, defaultValue) => {
|
|
|
60
60
|
export const adjustHeightWidthForSeatShape = (shape, props, valuesChanges) => {
|
|
61
61
|
if (shape === null || shape === void 0 ? void 0 : shape.includes("circle")) {
|
|
62
62
|
const sizeDefault = Math.min(props.width, props.height);
|
|
63
|
-
let sizeFinal = sizeDefault <
|
|
64
|
-
if (
|
|
65
|
-
sizeFinal =
|
|
63
|
+
let sizeFinal = sizeDefault < MIN_HEIGHT ? MIN_HEIGHT : sizeDefault;
|
|
64
|
+
if (valuesChanges === null || valuesChanges === void 0 ? void 0 : valuesChanges.width) {
|
|
65
|
+
sizeFinal =
|
|
66
|
+
(valuesChanges === null || valuesChanges === void 0 ? void 0 : valuesChanges.width) < MIN_HEIGHT ? MIN_HEIGHT : valuesChanges === null || valuesChanges === void 0 ? void 0 : valuesChanges.width;
|
|
67
|
+
}
|
|
68
|
+
if (valuesChanges === null || valuesChanges === void 0 ? void 0 : valuesChanges.height) {
|
|
69
|
+
sizeFinal =
|
|
70
|
+
(valuesChanges === null || valuesChanges === void 0 ? void 0 : valuesChanges.height) < MIN_HEIGHT ? MIN_HEIGHT : valuesChanges === null || valuesChanges === void 0 ? void 0 : valuesChanges.height;
|
|
66
71
|
}
|
|
67
72
|
return Object.assign(Object.assign({}, props), { height: isNaN(sizeFinal) ? MIN_WIDTH : sizeFinal, width: isNaN(sizeFinal) ? MIN_HEIGHT : sizeFinal });
|
|
68
73
|
}
|
|
@@ -113,9 +118,7 @@ export function isSameAllByKey(arr, key) {
|
|
|
113
118
|
export function getValueIfSame(arr, key) {
|
|
114
119
|
var _a;
|
|
115
120
|
if (key === "opacity") {
|
|
116
|
-
return isSameAllByKey(arr, key)
|
|
117
|
-
? Number(arr[0][key]) * 100
|
|
118
|
-
: undefined;
|
|
121
|
+
return isSameAllByKey(arr, key) ? Number(arr[0][key]) * 100 : undefined;
|
|
119
122
|
}
|
|
120
123
|
if (key === "labels") {
|
|
121
124
|
return (arr === null || arr === void 0 ? void 0 : arr.every((item) => { var _a; return _.isEqual(item === null || item === void 0 ? void 0 : item[key], (_a = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _a === void 0 ? void 0 : _a[key]); }))
|