seat-editor 1.2.13 → 1.2.15
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.
|
@@ -51,28 +51,29 @@ const LayerView = (props) => {
|
|
|
51
51
|
}
|
|
52
52
|
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
53
53
|
componentsEditor === null || componentsEditor === void 0 ? void 0 : componentsEditor.forEach((_) => {
|
|
54
|
+
var _a, _b, _c, _d;
|
|
54
55
|
let values = mappingKey ? _[mappingKey] : _.shape;
|
|
55
56
|
if (!values)
|
|
56
57
|
return;
|
|
57
|
-
if (values.shape.includes("square")) {
|
|
58
|
+
if ((_a = values === null || values === void 0 ? void 0 : values.shape) === null || _a === void 0 ? void 0 : _a.includes("square")) {
|
|
58
59
|
minX = Math.min(minX, values.x);
|
|
59
60
|
minY = Math.min(minY, values.y);
|
|
60
61
|
maxX = Math.max(maxX, values.x + values.width);
|
|
61
62
|
maxY = Math.max(maxY, values.y + values.height);
|
|
62
63
|
}
|
|
63
|
-
if (values.shape.includes("circle")) {
|
|
64
|
+
if ((_b = values === null || values === void 0 ? void 0 : values.shape) === null || _b === void 0 ? void 0 : _b.includes("circle")) {
|
|
64
65
|
minX = Math.min(minX, values.x);
|
|
65
66
|
minY = Math.min(minY, values.y);
|
|
66
67
|
maxX = Math.max(maxX, values.x + values.width);
|
|
67
68
|
maxY = Math.max(maxY, values.y + values.height);
|
|
68
69
|
}
|
|
69
|
-
if (values.shape.includes("table-seat-circle")) {
|
|
70
|
+
if ((_c = values === null || values === void 0 ? void 0 : values.shape) === null || _c === void 0 ? void 0 : _c.includes("table-seat-circle")) {
|
|
70
71
|
minX = Math.min(minX, values.x);
|
|
71
72
|
minY = Math.min(minY, values.y);
|
|
72
73
|
maxX = Math.max(maxX, values.x + values.width);
|
|
73
74
|
maxY = Math.max(maxY, values.y + values.height);
|
|
74
75
|
}
|
|
75
|
-
if (values.shape.includes("image-table")) {
|
|
76
|
+
if ((_d = values === null || values === void 0 ? void 0 : values.shape) === null || _d === void 0 ? void 0 : _d.includes("image-table")) {
|
|
76
77
|
minX = Math.min(minX, values.x);
|
|
77
78
|
minY = Math.min(minY, values.y);
|
|
78
79
|
maxX = Math.max(maxX, values.x + values.width);
|
|
@@ -119,7 +120,9 @@ const LayerView = (props) => {
|
|
|
119
120
|
});
|
|
120
121
|
};
|
|
121
122
|
return (<div className="relative w-full h-full flex-1" ref={containerRef}>
|
|
122
|
-
<TransformWrapper ref={transformRef} {...props.transformProps}
|
|
123
|
+
<TransformWrapper ref={transformRef} {...props.transformProps} panning={{
|
|
124
|
+
disabled: false,
|
|
125
|
+
}} centerZoomedOut={true} onTransformed={({ state: { scale } }) => setScale(scale)} minScale={1} maxScale={1000} initialScale={1} pinch={{ step: 1 }} smooth={true}>
|
|
123
126
|
<TransformComponent wrapperStyle={{
|
|
124
127
|
width: "100%",
|
|
125
128
|
height: "100%",
|