react-resizable-panels 2.0.3 → 2.0.4
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/declarations/src/PanelResizeHandle.d.ts +1 -0
- package/dist/declarations/src/PanelResizeHandleRegistry.d.ts +1 -2
- package/dist/react-resizable-panels.browser.cjs.js +55 -52
- package/dist/react-resizable-panels.browser.development.cjs.js +55 -52
- package/dist/react-resizable-panels.browser.development.esm.js +55 -52
- package/dist/react-resizable-panels.browser.esm.js +55 -52
- package/dist/react-resizable-panels.cjs.js +55 -52
- package/dist/react-resizable-panels.development.cjs.js +55 -52
- package/dist/react-resizable-panels.development.esm.js +55 -52
- package/dist/react-resizable-panels.development.node.cjs.js +55 -52
- package/dist/react-resizable-panels.development.node.esm.js +55 -52
- package/dist/react-resizable-panels.esm.js +55 -52
- package/dist/react-resizable-panels.node.cjs.js +55 -52
- package/dist/react-resizable-panels.node.esm.js +55 -52
- package/package.json +1 -1
- package/src/Panel.test.tsx +63 -0
- package/src/PanelGroup.test.tsx +21 -1
- package/src/PanelResizeHandle.test.tsx +181 -22
- package/src/PanelResizeHandle.ts +44 -24
- package/src/PanelResizeHandleRegistry.ts +13 -23
- package/src/utils/test-utils.ts +39 -0
|
@@ -354,24 +354,19 @@ function handlePointerMove(event) {
|
|
|
354
354
|
x,
|
|
355
355
|
y
|
|
356
356
|
} = getResizeEventCoordinates(event);
|
|
357
|
-
if (isPointerDown) {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
} = data;
|
|
362
|
-
setResizeHandlerState("move", "drag", event);
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
// Update cursor based on return value(s) from active handles
|
|
366
|
-
updateCursor();
|
|
367
|
-
} else {
|
|
357
|
+
if (!isPointerDown) {
|
|
358
|
+
// Recalculate intersecting handles whenever the pointer moves, except if it has already been pressed
|
|
359
|
+
// at that point, the handles may not move with the pointer (depending on constraints)
|
|
360
|
+
// but the same set of active handles should be locked until the pointer is released
|
|
368
361
|
recalculateIntersectingHandles({
|
|
369
362
|
x,
|
|
370
363
|
y
|
|
371
364
|
});
|
|
372
|
-
updateResizeHandlerStates("move", event);
|
|
373
|
-
updateCursor();
|
|
374
365
|
}
|
|
366
|
+
updateResizeHandlerStates("move", event);
|
|
367
|
+
|
|
368
|
+
// Update cursor based on return value(s) from active handles
|
|
369
|
+
updateCursor();
|
|
375
370
|
if (intersectingHandles.length > 0) {
|
|
376
371
|
event.preventDefault();
|
|
377
372
|
}
|
|
@@ -504,15 +499,8 @@ function updateResizeHandlerStates(action, event) {
|
|
|
504
499
|
const {
|
|
505
500
|
setResizeHandlerState
|
|
506
501
|
} = data;
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
setResizeHandlerState(action, "drag", event);
|
|
510
|
-
} else {
|
|
511
|
-
setResizeHandlerState(action, "hover", event);
|
|
512
|
-
}
|
|
513
|
-
} else {
|
|
514
|
-
setResizeHandlerState(action, "inactive", event);
|
|
515
|
-
}
|
|
502
|
+
const isActive = intersectingHandles.includes(data);
|
|
503
|
+
setResizeHandlerState(action, isActive, event);
|
|
516
504
|
});
|
|
517
505
|
}
|
|
518
506
|
|
|
@@ -2049,6 +2037,12 @@ function PanelResizeHandle({
|
|
|
2049
2037
|
const [state, setState] = useState("inactive");
|
|
2050
2038
|
const [isFocused, setIsFocused] = useState(false);
|
|
2051
2039
|
const [resizeHandler, setResizeHandler] = useState(null);
|
|
2040
|
+
const committedValuesRef = useRef({
|
|
2041
|
+
state
|
|
2042
|
+
});
|
|
2043
|
+
useLayoutEffect(() => {
|
|
2044
|
+
committedValuesRef.current.state = state;
|
|
2045
|
+
});
|
|
2052
2046
|
useEffect(() => {
|
|
2053
2047
|
if (disabled) {
|
|
2054
2048
|
setResizeHandler(null);
|
|
@@ -2064,38 +2058,47 @@ function PanelResizeHandle({
|
|
|
2064
2058
|
}
|
|
2065
2059
|
const element = elementRef.current;
|
|
2066
2060
|
assert(element);
|
|
2067
|
-
const setResizeHandlerState = (action,
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
onDragging
|
|
2061
|
+
const setResizeHandlerState = (action, isActive, event) => {
|
|
2062
|
+
if (isActive) {
|
|
2063
|
+
switch (action) {
|
|
2064
|
+
case "down":
|
|
2065
|
+
{
|
|
2066
|
+
setState("drag");
|
|
2067
|
+
startDragging(resizeHandleId, event);
|
|
2068
|
+
const {
|
|
2069
|
+
onDragging
|
|
2070
|
+
} = callbacksRef.current;
|
|
2071
|
+
if (onDragging) {
|
|
2072
|
+
onDragging(true);
|
|
2073
|
+
}
|
|
2074
|
+
break;
|
|
2078
2075
|
}
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2076
|
+
case "move":
|
|
2077
|
+
{
|
|
2078
|
+
const {
|
|
2079
|
+
state
|
|
2080
|
+
} = committedValuesRef.current;
|
|
2081
|
+
if (state !== "drag") {
|
|
2082
|
+
setState("hover");
|
|
2083
|
+
}
|
|
2084
|
+
resizeHandler(event);
|
|
2085
|
+
break;
|
|
2089
2086
|
}
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2087
|
+
case "up":
|
|
2088
|
+
{
|
|
2089
|
+
setState("hover");
|
|
2090
|
+
stopDragging();
|
|
2091
|
+
const {
|
|
2092
|
+
onDragging
|
|
2093
|
+
} = callbacksRef.current;
|
|
2094
|
+
if (onDragging) {
|
|
2095
|
+
onDragging(false);
|
|
2096
|
+
}
|
|
2097
|
+
break;
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
} else {
|
|
2101
|
+
setState("inactive");
|
|
2099
2102
|
}
|
|
2100
2103
|
};
|
|
2101
2104
|
return registerResizeHandle(resizeHandleId, element, direction, {
|
|
@@ -365,24 +365,19 @@ function handlePointerMove(event) {
|
|
|
365
365
|
x,
|
|
366
366
|
y
|
|
367
367
|
} = getResizeEventCoordinates(event);
|
|
368
|
-
if (isPointerDown) {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
} = data;
|
|
373
|
-
setResizeHandlerState("move", "drag", event);
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
// Update cursor based on return value(s) from active handles
|
|
377
|
-
updateCursor();
|
|
378
|
-
} else {
|
|
368
|
+
if (!isPointerDown) {
|
|
369
|
+
// Recalculate intersecting handles whenever the pointer moves, except if it has already been pressed
|
|
370
|
+
// at that point, the handles may not move with the pointer (depending on constraints)
|
|
371
|
+
// but the same set of active handles should be locked until the pointer is released
|
|
379
372
|
recalculateIntersectingHandles({
|
|
380
373
|
x,
|
|
381
374
|
y
|
|
382
375
|
});
|
|
383
|
-
updateResizeHandlerStates("move", event);
|
|
384
|
-
updateCursor();
|
|
385
376
|
}
|
|
377
|
+
updateResizeHandlerStates("move", event);
|
|
378
|
+
|
|
379
|
+
// Update cursor based on return value(s) from active handles
|
|
380
|
+
updateCursor();
|
|
386
381
|
if (intersectingHandles.length > 0) {
|
|
387
382
|
event.preventDefault();
|
|
388
383
|
}
|
|
@@ -515,15 +510,8 @@ function updateResizeHandlerStates(action, event) {
|
|
|
515
510
|
const {
|
|
516
511
|
setResizeHandlerState
|
|
517
512
|
} = data;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
setResizeHandlerState(action, "drag", event);
|
|
521
|
-
} else {
|
|
522
|
-
setResizeHandlerState(action, "hover", event);
|
|
523
|
-
}
|
|
524
|
-
} else {
|
|
525
|
-
setResizeHandlerState(action, "inactive", event);
|
|
526
|
-
}
|
|
513
|
+
const isActive = intersectingHandles.includes(data);
|
|
514
|
+
setResizeHandlerState(action, isActive, event);
|
|
527
515
|
});
|
|
528
516
|
}
|
|
529
517
|
|
|
@@ -2160,6 +2148,12 @@ function PanelResizeHandle({
|
|
|
2160
2148
|
const [state, setState] = useState("inactive");
|
|
2161
2149
|
const [isFocused, setIsFocused] = useState(false);
|
|
2162
2150
|
const [resizeHandler, setResizeHandler] = useState(null);
|
|
2151
|
+
const committedValuesRef = useRef({
|
|
2152
|
+
state
|
|
2153
|
+
});
|
|
2154
|
+
useLayoutEffect(() => {
|
|
2155
|
+
committedValuesRef.current.state = state;
|
|
2156
|
+
});
|
|
2163
2157
|
useEffect(() => {
|
|
2164
2158
|
if (disabled) {
|
|
2165
2159
|
setResizeHandler(null);
|
|
@@ -2175,38 +2169,47 @@ function PanelResizeHandle({
|
|
|
2175
2169
|
}
|
|
2176
2170
|
const element = elementRef.current;
|
|
2177
2171
|
assert(element);
|
|
2178
|
-
const setResizeHandlerState = (action,
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
onDragging
|
|
2172
|
+
const setResizeHandlerState = (action, isActive, event) => {
|
|
2173
|
+
if (isActive) {
|
|
2174
|
+
switch (action) {
|
|
2175
|
+
case "down":
|
|
2176
|
+
{
|
|
2177
|
+
setState("drag");
|
|
2178
|
+
startDragging(resizeHandleId, event);
|
|
2179
|
+
const {
|
|
2180
|
+
onDragging
|
|
2181
|
+
} = callbacksRef.current;
|
|
2182
|
+
if (onDragging) {
|
|
2183
|
+
onDragging(true);
|
|
2184
|
+
}
|
|
2185
|
+
break;
|
|
2189
2186
|
}
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2187
|
+
case "move":
|
|
2188
|
+
{
|
|
2189
|
+
const {
|
|
2190
|
+
state
|
|
2191
|
+
} = committedValuesRef.current;
|
|
2192
|
+
if (state !== "drag") {
|
|
2193
|
+
setState("hover");
|
|
2194
|
+
}
|
|
2195
|
+
resizeHandler(event);
|
|
2196
|
+
break;
|
|
2200
2197
|
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2198
|
+
case "up":
|
|
2199
|
+
{
|
|
2200
|
+
setState("hover");
|
|
2201
|
+
stopDragging();
|
|
2202
|
+
const {
|
|
2203
|
+
onDragging
|
|
2204
|
+
} = callbacksRef.current;
|
|
2205
|
+
if (onDragging) {
|
|
2206
|
+
onDragging(false);
|
|
2207
|
+
}
|
|
2208
|
+
break;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
} else {
|
|
2212
|
+
setState("inactive");
|
|
2210
2213
|
}
|
|
2211
2214
|
};
|
|
2212
2215
|
return registerResizeHandle(resizeHandleId, element, direction, {
|
|
@@ -341,24 +341,19 @@ function handlePointerMove(event) {
|
|
|
341
341
|
x,
|
|
342
342
|
y
|
|
343
343
|
} = getResizeEventCoordinates(event);
|
|
344
|
-
if (isPointerDown) {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
} = data;
|
|
349
|
-
setResizeHandlerState("move", "drag", event);
|
|
350
|
-
});
|
|
351
|
-
|
|
352
|
-
// Update cursor based on return value(s) from active handles
|
|
353
|
-
updateCursor();
|
|
354
|
-
} else {
|
|
344
|
+
if (!isPointerDown) {
|
|
345
|
+
// Recalculate intersecting handles whenever the pointer moves, except if it has already been pressed
|
|
346
|
+
// at that point, the handles may not move with the pointer (depending on constraints)
|
|
347
|
+
// but the same set of active handles should be locked until the pointer is released
|
|
355
348
|
recalculateIntersectingHandles({
|
|
356
349
|
x,
|
|
357
350
|
y
|
|
358
351
|
});
|
|
359
|
-
updateResizeHandlerStates("move", event);
|
|
360
|
-
updateCursor();
|
|
361
352
|
}
|
|
353
|
+
updateResizeHandlerStates("move", event);
|
|
354
|
+
|
|
355
|
+
// Update cursor based on return value(s) from active handles
|
|
356
|
+
updateCursor();
|
|
362
357
|
if (intersectingHandles.length > 0) {
|
|
363
358
|
event.preventDefault();
|
|
364
359
|
}
|
|
@@ -491,15 +486,8 @@ function updateResizeHandlerStates(action, event) {
|
|
|
491
486
|
const {
|
|
492
487
|
setResizeHandlerState
|
|
493
488
|
} = data;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
setResizeHandlerState(action, "drag", event);
|
|
497
|
-
} else {
|
|
498
|
-
setResizeHandlerState(action, "hover", event);
|
|
499
|
-
}
|
|
500
|
-
} else {
|
|
501
|
-
setResizeHandlerState(action, "inactive", event);
|
|
502
|
-
}
|
|
489
|
+
const isActive = intersectingHandles.includes(data);
|
|
490
|
+
setResizeHandlerState(action, isActive, event);
|
|
503
491
|
});
|
|
504
492
|
}
|
|
505
493
|
|
|
@@ -2136,6 +2124,12 @@ function PanelResizeHandle({
|
|
|
2136
2124
|
const [state, setState] = useState("inactive");
|
|
2137
2125
|
const [isFocused, setIsFocused] = useState(false);
|
|
2138
2126
|
const [resizeHandler, setResizeHandler] = useState(null);
|
|
2127
|
+
const committedValuesRef = useRef({
|
|
2128
|
+
state
|
|
2129
|
+
});
|
|
2130
|
+
useLayoutEffect(() => {
|
|
2131
|
+
committedValuesRef.current.state = state;
|
|
2132
|
+
});
|
|
2139
2133
|
useEffect(() => {
|
|
2140
2134
|
if (disabled) {
|
|
2141
2135
|
setResizeHandler(null);
|
|
@@ -2151,38 +2145,47 @@ function PanelResizeHandle({
|
|
|
2151
2145
|
}
|
|
2152
2146
|
const element = elementRef.current;
|
|
2153
2147
|
assert(element);
|
|
2154
|
-
const setResizeHandlerState = (action,
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
onDragging
|
|
2148
|
+
const setResizeHandlerState = (action, isActive, event) => {
|
|
2149
|
+
if (isActive) {
|
|
2150
|
+
switch (action) {
|
|
2151
|
+
case "down":
|
|
2152
|
+
{
|
|
2153
|
+
setState("drag");
|
|
2154
|
+
startDragging(resizeHandleId, event);
|
|
2155
|
+
const {
|
|
2156
|
+
onDragging
|
|
2157
|
+
} = callbacksRef.current;
|
|
2158
|
+
if (onDragging) {
|
|
2159
|
+
onDragging(true);
|
|
2160
|
+
}
|
|
2161
|
+
break;
|
|
2165
2162
|
}
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2163
|
+
case "move":
|
|
2164
|
+
{
|
|
2165
|
+
const {
|
|
2166
|
+
state
|
|
2167
|
+
} = committedValuesRef.current;
|
|
2168
|
+
if (state !== "drag") {
|
|
2169
|
+
setState("hover");
|
|
2170
|
+
}
|
|
2171
|
+
resizeHandler(event);
|
|
2172
|
+
break;
|
|
2176
2173
|
}
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2174
|
+
case "up":
|
|
2175
|
+
{
|
|
2176
|
+
setState("hover");
|
|
2177
|
+
stopDragging();
|
|
2178
|
+
const {
|
|
2179
|
+
onDragging
|
|
2180
|
+
} = callbacksRef.current;
|
|
2181
|
+
if (onDragging) {
|
|
2182
|
+
onDragging(false);
|
|
2183
|
+
}
|
|
2184
|
+
break;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
} else {
|
|
2188
|
+
setState("inactive");
|
|
2186
2189
|
}
|
|
2187
2190
|
};
|
|
2188
2191
|
return registerResizeHandle(resizeHandleId, element, direction, {
|
|
@@ -328,24 +328,19 @@ function handlePointerMove(event) {
|
|
|
328
328
|
x,
|
|
329
329
|
y
|
|
330
330
|
} = getResizeEventCoordinates(event);
|
|
331
|
-
if (isPointerDown) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
} = data;
|
|
336
|
-
setResizeHandlerState("move", "drag", event);
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
// Update cursor based on return value(s) from active handles
|
|
340
|
-
updateCursor();
|
|
341
|
-
} else {
|
|
331
|
+
if (!isPointerDown) {
|
|
332
|
+
// Recalculate intersecting handles whenever the pointer moves, except if it has already been pressed
|
|
333
|
+
// at that point, the handles may not move with the pointer (depending on constraints)
|
|
334
|
+
// but the same set of active handles should be locked until the pointer is released
|
|
342
335
|
recalculateIntersectingHandles({
|
|
343
336
|
x,
|
|
344
337
|
y
|
|
345
338
|
});
|
|
346
|
-
updateResizeHandlerStates("move", event);
|
|
347
|
-
updateCursor();
|
|
348
339
|
}
|
|
340
|
+
updateResizeHandlerStates("move", event);
|
|
341
|
+
|
|
342
|
+
// Update cursor based on return value(s) from active handles
|
|
343
|
+
updateCursor();
|
|
349
344
|
if (intersectingHandles.length > 0) {
|
|
350
345
|
event.preventDefault();
|
|
351
346
|
}
|
|
@@ -478,15 +473,8 @@ function updateResizeHandlerStates(action, event) {
|
|
|
478
473
|
const {
|
|
479
474
|
setResizeHandlerState
|
|
480
475
|
} = data;
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
setResizeHandlerState(action, "drag", event);
|
|
484
|
-
} else {
|
|
485
|
-
setResizeHandlerState(action, "hover", event);
|
|
486
|
-
}
|
|
487
|
-
} else {
|
|
488
|
-
setResizeHandlerState(action, "inactive", event);
|
|
489
|
-
}
|
|
476
|
+
const isActive = intersectingHandles.includes(data);
|
|
477
|
+
setResizeHandlerState(action, isActive, event);
|
|
490
478
|
});
|
|
491
479
|
}
|
|
492
480
|
|
|
@@ -1929,6 +1917,12 @@ function PanelResizeHandle({
|
|
|
1929
1917
|
const [state, setState] = useState("inactive");
|
|
1930
1918
|
const [isFocused, setIsFocused] = useState(false);
|
|
1931
1919
|
const [resizeHandler, setResizeHandler] = useState(null);
|
|
1920
|
+
const committedValuesRef = useRef({
|
|
1921
|
+
state
|
|
1922
|
+
});
|
|
1923
|
+
useLayoutEffect(() => {
|
|
1924
|
+
committedValuesRef.current.state = state;
|
|
1925
|
+
});
|
|
1932
1926
|
useEffect(() => {
|
|
1933
1927
|
if (disabled) {
|
|
1934
1928
|
setResizeHandler(null);
|
|
@@ -1944,38 +1938,47 @@ function PanelResizeHandle({
|
|
|
1944
1938
|
}
|
|
1945
1939
|
const element = elementRef.current;
|
|
1946
1940
|
assert(element);
|
|
1947
|
-
const setResizeHandlerState = (action,
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
onDragging
|
|
1941
|
+
const setResizeHandlerState = (action, isActive, event) => {
|
|
1942
|
+
if (isActive) {
|
|
1943
|
+
switch (action) {
|
|
1944
|
+
case "down":
|
|
1945
|
+
{
|
|
1946
|
+
setState("drag");
|
|
1947
|
+
startDragging(resizeHandleId, event);
|
|
1948
|
+
const {
|
|
1949
|
+
onDragging
|
|
1950
|
+
} = callbacksRef.current;
|
|
1951
|
+
if (onDragging) {
|
|
1952
|
+
onDragging(true);
|
|
1953
|
+
}
|
|
1954
|
+
break;
|
|
1958
1955
|
}
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1956
|
+
case "move":
|
|
1957
|
+
{
|
|
1958
|
+
const {
|
|
1959
|
+
state
|
|
1960
|
+
} = committedValuesRef.current;
|
|
1961
|
+
if (state !== "drag") {
|
|
1962
|
+
setState("hover");
|
|
1963
|
+
}
|
|
1964
|
+
resizeHandler(event);
|
|
1965
|
+
break;
|
|
1969
1966
|
}
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1967
|
+
case "up":
|
|
1968
|
+
{
|
|
1969
|
+
setState("hover");
|
|
1970
|
+
stopDragging();
|
|
1971
|
+
const {
|
|
1972
|
+
onDragging
|
|
1973
|
+
} = callbacksRef.current;
|
|
1974
|
+
if (onDragging) {
|
|
1975
|
+
onDragging(false);
|
|
1976
|
+
}
|
|
1977
|
+
break;
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
} else {
|
|
1981
|
+
setState("inactive");
|
|
1979
1982
|
}
|
|
1980
1983
|
};
|
|
1981
1984
|
return registerResizeHandle(resizeHandleId, element, direction, {
|