seat-editor 1.2.12 → 1.2.14

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.
@@ -10,6 +10,7 @@ export interface LayerViewProps {
10
10
  key: string;
11
11
  }[];
12
12
  statusKey: string;
13
+ transformProps?: any;
13
14
  }
14
15
  declare const LayerView: (props: LayerViewProps) => import("react").JSX.Element;
15
16
  export default LayerView;
@@ -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,7 @@ 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} panning={{ disabled: false }} centerZoomedOut={true} onTransformed={({ state: { scale } }) => setScale(scale)} minScale={1} maxScale={1000} initialScale={1} pinch={{ step: 1 }} smooth={true}>
123
+ <TransformWrapper ref={transformRef} {...props.transformProps} centerZoomedOut={true} onTransformed={({ state: { scale } }) => setScale(scale)} minScale={1} maxScale={1000} initialScale={1} pinch={{ step: 1 }} smooth={true}>
123
124
  <TransformComponent wrapperStyle={{
124
125
  width: "100%",
125
126
  height: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",