mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-03 20:35:17 +00:00
FloatingPlayer: Minor function-renaming for clarity
This commit is contained in:
parent
92611af9c0
commit
ddfc2a54b8
1 changed files with 6 additions and 6 deletions
|
@ -90,12 +90,12 @@ export default function FileRenderFloating(props: Props) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleStart(e, ui) {
|
function handleDragStart(e, ui) {
|
||||||
// Not really necessary, but reset just in case 'handleStop' didn't fire.
|
// Not really necessary, but reset just in case 'handleStop' didn't fire.
|
||||||
setWasDragging(false);
|
setWasDragging(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleDrag(e, ui) {
|
function handleDragMove(e, ui) {
|
||||||
setWasDragging(true);
|
setWasDragging(true);
|
||||||
|
|
||||||
const { x, y } = position;
|
const { x, y } = position;
|
||||||
|
@ -107,7 +107,7 @@ export default function FileRenderFloating(props: Props) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleStop(e, ui) {
|
function handleDragStop(e, ui) {
|
||||||
if (wasDragging) {
|
if (wasDragging) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setWasDragging(false);
|
setWasDragging(false);
|
||||||
|
@ -116,9 +116,9 @@ export default function FileRenderFloating(props: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Draggable
|
<Draggable
|
||||||
onDrag={handleDrag}
|
onDrag={handleDragMove}
|
||||||
onStart={handleStart}
|
onStart={handleDragStart}
|
||||||
onStop={handleStop}
|
onStop={handleDragStop}
|
||||||
defaultPosition={position}
|
defaultPosition={position}
|
||||||
position={isFloating ? position : { x: 0, y: 0 }}
|
position={isFloating ? position : { x: 0, y: 0 }}
|
||||||
bounds="parent"
|
bounds="parent"
|
||||||
|
|
Loading…
Add table
Reference in a new issue