@gfazioli/mantine-window 0.5.6 → 0.5.7
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.
|
@@ -111,6 +111,9 @@ function useMantineWindow(props) {
|
|
|
111
111
|
if (e.target.closest("[data-resize-handle]")) {
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
+
if (!e.touches[0]) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
114
117
|
const touch = e.touches[0];
|
|
115
118
|
bringToFront();
|
|
116
119
|
isDragging.current = true;
|
|
@@ -146,6 +149,9 @@ function useMantineWindow(props) {
|
|
|
146
149
|
);
|
|
147
150
|
const handleTouchStartResizeTopLeft = React.useCallback(
|
|
148
151
|
(e) => {
|
|
152
|
+
if (!e.touches[0]) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
149
155
|
const touch = e.touches[0];
|
|
150
156
|
bringToFront();
|
|
151
157
|
isResizing.current = true;
|
|
@@ -185,6 +191,9 @@ function useMantineWindow(props) {
|
|
|
185
191
|
);
|
|
186
192
|
const handleTouchStartResizeTop = React.useCallback(
|
|
187
193
|
(e) => {
|
|
194
|
+
if (!e.touches[0]) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
188
197
|
const touch = e.touches[0];
|
|
189
198
|
bringToFront();
|
|
190
199
|
isResizing.current = true;
|
|
@@ -224,6 +233,9 @@ function useMantineWindow(props) {
|
|
|
224
233
|
);
|
|
225
234
|
const handleTouchStartResizeTopRight = React.useCallback(
|
|
226
235
|
(e) => {
|
|
236
|
+
if (!e.touches[0]) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
227
239
|
const touch = e.touches[0];
|
|
228
240
|
bringToFront();
|
|
229
241
|
isResizing.current = true;
|
|
@@ -263,6 +275,9 @@ function useMantineWindow(props) {
|
|
|
263
275
|
);
|
|
264
276
|
const handleTouchStartResizeRight = React.useCallback(
|
|
265
277
|
(e) => {
|
|
278
|
+
if (!e.touches[0]) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
266
281
|
const touch = e.touches[0];
|
|
267
282
|
bringToFront();
|
|
268
283
|
isResizing.current = true;
|
|
@@ -302,6 +317,9 @@ function useMantineWindow(props) {
|
|
|
302
317
|
);
|
|
303
318
|
const handleTouchStartResizeBottomRight = React.useCallback(
|
|
304
319
|
(e) => {
|
|
320
|
+
if (!e.touches[0]) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
305
323
|
const touch = e.touches[0];
|
|
306
324
|
bringToFront();
|
|
307
325
|
isResizing.current = true;
|
|
@@ -341,6 +359,9 @@ function useMantineWindow(props) {
|
|
|
341
359
|
);
|
|
342
360
|
const handleTouchStartResizeBottom = React.useCallback(
|
|
343
361
|
(e) => {
|
|
362
|
+
if (!e.touches[0]) {
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
344
365
|
const touch = e.touches[0];
|
|
345
366
|
bringToFront();
|
|
346
367
|
isResizing.current = true;
|
|
@@ -380,6 +401,9 @@ function useMantineWindow(props) {
|
|
|
380
401
|
);
|
|
381
402
|
const handleTouchStartResizeBottomLeft = React.useCallback(
|
|
382
403
|
(e) => {
|
|
404
|
+
if (!e.touches[0]) {
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
383
407
|
const touch = e.touches[0];
|
|
384
408
|
bringToFront();
|
|
385
409
|
isResizing.current = true;
|
|
@@ -419,6 +443,9 @@ function useMantineWindow(props) {
|
|
|
419
443
|
);
|
|
420
444
|
const handleTouchStartResizeLeft = React.useCallback(
|
|
421
445
|
(e) => {
|
|
446
|
+
if (!e.touches[0]) {
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
422
449
|
const touch = e.touches[0];
|
|
423
450
|
bringToFront();
|
|
424
451
|
isResizing.current = true;
|
|
@@ -560,6 +587,9 @@ function useMantineWindow(props) {
|
|
|
560
587
|
}
|
|
561
588
|
};
|
|
562
589
|
const handleTouchMove = (e) => {
|
|
590
|
+
if (!e.touches[0]) {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
563
593
|
if (isDragging.current || isResizing.current) {
|
|
564
594
|
const touch = e.touches[0];
|
|
565
595
|
if (isDragging.current) {
|