react-resizable-panels 2.0.10 → 2.0.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.
- package/CHANGELOG.md +4 -0
- package/dist/react-resizable-panels.browser.cjs.js +5 -5
- package/dist/react-resizable-panels.browser.development.cjs.js +5 -5
- package/dist/react-resizable-panels.browser.development.esm.js +5 -5
- package/dist/react-resizable-panels.browser.esm.js +5 -5
- package/dist/react-resizable-panels.cjs.js +5 -5
- package/dist/react-resizable-panels.development.cjs.js +5 -5
- package/dist/react-resizable-panels.development.esm.js +5 -5
- package/dist/react-resizable-panels.development.node.cjs.js +5 -5
- package/dist/react-resizable-panels.development.node.esm.js +5 -5
- package/dist/react-resizable-panels.esm.js +5 -5
- package/dist/react-resizable-panels.node.cjs.js +5 -5
- package/dist/react-resizable-panels.node.esm.js +5 -5
- package/package.json +1 -1
- package/src/utils/events/getResizeEventCoordinates.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -271,15 +271,15 @@ function isTouchEvent(event) {
|
|
|
271
271
|
function getResizeEventCoordinates(event) {
|
|
272
272
|
if (isMouseEvent(event)) {
|
|
273
273
|
return {
|
|
274
|
-
x: event.
|
|
275
|
-
y: event.
|
|
274
|
+
x: event.clientX,
|
|
275
|
+
y: event.clientY
|
|
276
276
|
};
|
|
277
277
|
} else if (isTouchEvent(event)) {
|
|
278
278
|
const touch = event.touches[0];
|
|
279
|
-
if (touch && touch.
|
|
279
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
280
280
|
return {
|
|
281
|
-
x: touch.
|
|
282
|
-
y: touch.
|
|
281
|
+
x: touch.clientX,
|
|
282
|
+
y: touch.clientY
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
285
|
}
|
|
@@ -277,15 +277,15 @@ function isTouchEvent(event) {
|
|
|
277
277
|
function getResizeEventCoordinates(event) {
|
|
278
278
|
if (isMouseEvent(event)) {
|
|
279
279
|
return {
|
|
280
|
-
x: event.
|
|
281
|
-
y: event.
|
|
280
|
+
x: event.clientX,
|
|
281
|
+
y: event.clientY
|
|
282
282
|
};
|
|
283
283
|
} else if (isTouchEvent(event)) {
|
|
284
284
|
const touch = event.touches[0];
|
|
285
|
-
if (touch && touch.
|
|
285
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
286
286
|
return {
|
|
287
|
-
x: touch.
|
|
288
|
-
y: touch.
|
|
287
|
+
x: touch.clientX,
|
|
288
|
+
y: touch.clientY
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
}
|
|
@@ -253,15 +253,15 @@ function isTouchEvent(event) {
|
|
|
253
253
|
function getResizeEventCoordinates(event) {
|
|
254
254
|
if (isMouseEvent(event)) {
|
|
255
255
|
return {
|
|
256
|
-
x: event.
|
|
257
|
-
y: event.
|
|
256
|
+
x: event.clientX,
|
|
257
|
+
y: event.clientY
|
|
258
258
|
};
|
|
259
259
|
} else if (isTouchEvent(event)) {
|
|
260
260
|
const touch = event.touches[0];
|
|
261
|
-
if (touch && touch.
|
|
261
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
262
262
|
return {
|
|
263
|
-
x: touch.
|
|
264
|
-
y: touch.
|
|
263
|
+
x: touch.clientX,
|
|
264
|
+
y: touch.clientY
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
}
|
|
@@ -247,15 +247,15 @@ function isTouchEvent(event) {
|
|
|
247
247
|
function getResizeEventCoordinates(event) {
|
|
248
248
|
if (isMouseEvent(event)) {
|
|
249
249
|
return {
|
|
250
|
-
x: event.
|
|
251
|
-
y: event.
|
|
250
|
+
x: event.clientX,
|
|
251
|
+
y: event.clientY
|
|
252
252
|
};
|
|
253
253
|
} else if (isTouchEvent(event)) {
|
|
254
254
|
const touch = event.touches[0];
|
|
255
|
-
if (touch && touch.
|
|
255
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
256
256
|
return {
|
|
257
|
-
x: touch.
|
|
258
|
-
y: touch.
|
|
257
|
+
x: touch.clientX,
|
|
258
|
+
y: touch.clientY
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -273,15 +273,15 @@ function isTouchEvent(event) {
|
|
|
273
273
|
function getResizeEventCoordinates(event) {
|
|
274
274
|
if (isMouseEvent(event)) {
|
|
275
275
|
return {
|
|
276
|
-
x: event.
|
|
277
|
-
y: event.
|
|
276
|
+
x: event.clientX,
|
|
277
|
+
y: event.clientY
|
|
278
278
|
};
|
|
279
279
|
} else if (isTouchEvent(event)) {
|
|
280
280
|
const touch = event.touches[0];
|
|
281
|
-
if (touch && touch.
|
|
281
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
282
282
|
return {
|
|
283
|
-
x: touch.
|
|
284
|
-
y: touch.
|
|
283
|
+
x: touch.clientX,
|
|
284
|
+
y: touch.clientY
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
287
|
}
|
|
@@ -284,15 +284,15 @@ function isTouchEvent(event) {
|
|
|
284
284
|
function getResizeEventCoordinates(event) {
|
|
285
285
|
if (isMouseEvent(event)) {
|
|
286
286
|
return {
|
|
287
|
-
x: event.
|
|
288
|
-
y: event.
|
|
287
|
+
x: event.clientX,
|
|
288
|
+
y: event.clientY
|
|
289
289
|
};
|
|
290
290
|
} else if (isTouchEvent(event)) {
|
|
291
291
|
const touch = event.touches[0];
|
|
292
|
-
if (touch && touch.
|
|
292
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
293
293
|
return {
|
|
294
|
-
x: touch.
|
|
295
|
-
y: touch.
|
|
294
|
+
x: touch.clientX,
|
|
295
|
+
y: touch.clientY
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
}
|
|
@@ -260,15 +260,15 @@ function isTouchEvent(event) {
|
|
|
260
260
|
function getResizeEventCoordinates(event) {
|
|
261
261
|
if (isMouseEvent(event)) {
|
|
262
262
|
return {
|
|
263
|
-
x: event.
|
|
264
|
-
y: event.
|
|
263
|
+
x: event.clientX,
|
|
264
|
+
y: event.clientY
|
|
265
265
|
};
|
|
266
266
|
} else if (isTouchEvent(event)) {
|
|
267
267
|
const touch = event.touches[0];
|
|
268
|
-
if (touch && touch.
|
|
268
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
269
269
|
return {
|
|
270
|
-
x: touch.
|
|
271
|
-
y: touch.
|
|
270
|
+
x: touch.clientX,
|
|
271
|
+
y: touch.clientY
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
}
|
|
@@ -246,15 +246,15 @@ function isTouchEvent(event) {
|
|
|
246
246
|
function getResizeEventCoordinates(event) {
|
|
247
247
|
if (isMouseEvent(event)) {
|
|
248
248
|
return {
|
|
249
|
-
x: event.
|
|
250
|
-
y: event.
|
|
249
|
+
x: event.clientX,
|
|
250
|
+
y: event.clientY
|
|
251
251
|
};
|
|
252
252
|
} else if (isTouchEvent(event)) {
|
|
253
253
|
const touch = event.touches[0];
|
|
254
|
-
if (touch && touch.
|
|
254
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
255
255
|
return {
|
|
256
|
-
x: touch.
|
|
257
|
-
y: touch.
|
|
256
|
+
x: touch.clientX,
|
|
257
|
+
y: touch.clientY
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -222,15 +222,15 @@ function isTouchEvent(event) {
|
|
|
222
222
|
function getResizeEventCoordinates(event) {
|
|
223
223
|
if (isMouseEvent(event)) {
|
|
224
224
|
return {
|
|
225
|
-
x: event.
|
|
226
|
-
y: event.
|
|
225
|
+
x: event.clientX,
|
|
226
|
+
y: event.clientY
|
|
227
227
|
};
|
|
228
228
|
} else if (isTouchEvent(event)) {
|
|
229
229
|
const touch = event.touches[0];
|
|
230
|
-
if (touch && touch.
|
|
230
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
231
231
|
return {
|
|
232
|
-
x: touch.
|
|
233
|
-
y: touch.
|
|
232
|
+
x: touch.clientX,
|
|
233
|
+
y: touch.clientY
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
}
|
|
@@ -249,15 +249,15 @@ function isTouchEvent(event) {
|
|
|
249
249
|
function getResizeEventCoordinates(event) {
|
|
250
250
|
if (isMouseEvent(event)) {
|
|
251
251
|
return {
|
|
252
|
-
x: event.
|
|
253
|
-
y: event.
|
|
252
|
+
x: event.clientX,
|
|
253
|
+
y: event.clientY
|
|
254
254
|
};
|
|
255
255
|
} else if (isTouchEvent(event)) {
|
|
256
256
|
const touch = event.touches[0];
|
|
257
|
-
if (touch && touch.
|
|
257
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
258
258
|
return {
|
|
259
|
-
x: touch.
|
|
260
|
-
y: touch.
|
|
259
|
+
x: touch.clientX,
|
|
260
|
+
y: touch.clientY
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
263
|
}
|
|
@@ -235,15 +235,15 @@ function isTouchEvent(event) {
|
|
|
235
235
|
function getResizeEventCoordinates(event) {
|
|
236
236
|
if (isMouseEvent(event)) {
|
|
237
237
|
return {
|
|
238
|
-
x: event.
|
|
239
|
-
y: event.
|
|
238
|
+
x: event.clientX,
|
|
239
|
+
y: event.clientY
|
|
240
240
|
};
|
|
241
241
|
} else if (isTouchEvent(event)) {
|
|
242
242
|
const touch = event.touches[0];
|
|
243
|
-
if (touch && touch.
|
|
243
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
244
244
|
return {
|
|
245
|
-
x: touch.
|
|
246
|
-
y: touch.
|
|
245
|
+
x: touch.clientX,
|
|
246
|
+
y: touch.clientY
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
249
|
}
|
|
@@ -211,15 +211,15 @@ function isTouchEvent(event) {
|
|
|
211
211
|
function getResizeEventCoordinates(event) {
|
|
212
212
|
if (isMouseEvent(event)) {
|
|
213
213
|
return {
|
|
214
|
-
x: event.
|
|
215
|
-
y: event.
|
|
214
|
+
x: event.clientX,
|
|
215
|
+
y: event.clientY
|
|
216
216
|
};
|
|
217
217
|
} else if (isTouchEvent(event)) {
|
|
218
218
|
const touch = event.touches[0];
|
|
219
|
-
if (touch && touch.
|
|
219
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
220
220
|
return {
|
|
221
|
-
x: touch.
|
|
222
|
-
y: touch.
|
|
221
|
+
x: touch.clientX,
|
|
222
|
+
y: touch.clientY
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
}
|
package/package.json
CHANGED
|
@@ -4,15 +4,15 @@ import { isMouseEvent, isTouchEvent } from ".";
|
|
|
4
4
|
export function getResizeEventCoordinates(event: ResizeEvent) {
|
|
5
5
|
if (isMouseEvent(event)) {
|
|
6
6
|
return {
|
|
7
|
-
x: event.
|
|
8
|
-
y: event.
|
|
7
|
+
x: event.clientX,
|
|
8
|
+
y: event.clientY,
|
|
9
9
|
};
|
|
10
10
|
} else if (isTouchEvent(event)) {
|
|
11
11
|
const touch = event.touches[0];
|
|
12
|
-
if (touch && touch.
|
|
12
|
+
if (touch && touch.clientX && touch.clientY) {
|
|
13
13
|
return {
|
|
14
|
-
x: touch.
|
|
15
|
-
y: touch.
|
|
14
|
+
x: touch.clientX,
|
|
15
|
+
y: touch.clientY,
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
}
|