seat-editor 1.2.27 → 1.2.29
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.
|
@@ -35,6 +35,6 @@ const TouchScrollDetect = () => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}, []);
|
|
38
|
-
return (_jsxs("div", { id: "scroll-container", className: "
|
|
38
|
+
return (_jsxs("div", { id: "scroll-container", className: "bg-gray-100 p-6 text-gray-800", children: [_jsx("div", { className: "h-[400px] bg-white mt-4 rounded p-4 shadow", children: _jsx("p", { children: "Scroll this page with 1 or 2 fingers." }) }), _jsx(LayerView, { statusKey: "status", defaultBackground: "#000000" }), _jsxs("div", { className: "sticky top-0 bg-white z-10 py-2", children: [scrollType === "one" && (_jsx("p", { className: "text-blue-600 font-medium", children: "\uD83D\uDC46 One-finger scroll" })), scrollType === "two" && (_jsx("p", { className: "text-green-600 font-medium", children: "\u270C\uFE0F Two-finger scroll" })), scrollType === "other" && (_jsxs("p", { className: "text-red-600 font-medium", children: ["\uD83D\uDD90\uFE0F ", fingerCount, " fingers on screen"] }))] }), _jsx("div", { className: "h-[200px] bg-white mt-4 rounded p-4 shadow", children: _jsx("p", { children: "Scroll this page with 1 or 2 fingers." }) })] }));
|
|
39
39
|
};
|
|
40
40
|
export default TouchScrollDetect;
|
|
@@ -131,10 +131,18 @@ const LayerView = (props) => {
|
|
|
131
131
|
overflow: "auto",
|
|
132
132
|
WebkitOverflowScrolling: "touch",
|
|
133
133
|
touchAction: "pan-y",
|
|
134
|
-
} }, props.containerProps, { children: _jsx(TransformWrapper, Object.assign({ ref: transformRef }, props.transformProps, {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
} }, props.containerProps, { children: _jsx(TransformWrapper, Object.assign({ ref: transformRef }, props.transformProps, {
|
|
135
|
+
// panning={{
|
|
136
|
+
// disabled: false,
|
|
137
|
+
// velocityDisabled: true,
|
|
138
|
+
// }}
|
|
139
|
+
// limitToBounds={false}
|
|
140
|
+
// doubleClick={{ disabled: true }}
|
|
141
|
+
// pinch={{ disabled: false }}
|
|
142
|
+
// wheel={{ disabled: true }}
|
|
143
|
+
// disabled={true}
|
|
144
|
+
// disablePadding={true}
|
|
145
|
+
centerZoomedOut: true, onTransformed: ({ state: { scale } }) => setScale(scale), minScale: 1, maxScale: 1000, initialScale: 1,
|
|
138
146
|
// pinch={{ step: 1 }}
|
|
139
147
|
smooth: true, children: _jsx(TransformComponent, { wrapperStyle: {
|
|
140
148
|
width: "100%",
|
|
@@ -147,7 +155,7 @@ const LayerView = (props) => {
|
|
|
147
155
|
background: "#000000",
|
|
148
156
|
display: "block",
|
|
149
157
|
pointerEvents: "auto",
|
|
150
|
-
touchAction: "pan-y",
|
|
158
|
+
// touchAction: "pan-y",
|
|
151
159
|
}, children: _jsx(Layers, { mode: "view", components: [
|
|
152
160
|
...extraComponentsEditor,
|
|
153
161
|
...renderElements(componentsEditor, mappingKey, colorMatchKey),
|