mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 12:20:20 +01:00
This commit is contained in:
parent
997dfd9c1f
commit
233b55b4b2
|
|
@ -65,7 +65,7 @@ const useDraggableEntries = (
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (focusedElements.length > 1) {
|
if (focusedElements.length > 0) {
|
||||||
if (dragImageRef.current) dragImageRef.current.src = "";
|
if (dragImageRef.current) dragImageRef.current.src = "";
|
||||||
else dragImageRef.current = new Image();
|
else dragImageRef.current = new Image();
|
||||||
|
|
||||||
|
|
@ -202,7 +202,7 @@ const useDraggableEntries = (
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!singleFile && dragImageRef.current) {
|
if (dragImageRef.current) {
|
||||||
if (!adjustedCaptureOffsetRef.current) {
|
if (!adjustedCaptureOffsetRef.current) {
|
||||||
adjustedCaptureOffsetRef.current = true;
|
adjustedCaptureOffsetRef.current = true;
|
||||||
|
|
||||||
|
|
@ -234,7 +234,7 @@ const useDraggableEntries = (
|
||||||
|
|
||||||
if (allowMoving) {
|
if (allowMoving) {
|
||||||
dragPositionRef.current =
|
dragPositionRef.current =
|
||||||
focusedEntries.length > 1
|
focusedEntries.length > 0
|
||||||
? {
|
? {
|
||||||
offsetX: event.nativeEvent.offsetX,
|
offsetX: event.nativeEvent.offsetX,
|
||||||
offsetY: event.nativeEvent.offsetY,
|
offsetY: event.nativeEvent.offsetY,
|
||||||
|
|
@ -256,7 +256,7 @@ const useDraggableEntries = (
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isSelecting && focusedEntries.length > 1) updateDragImage();
|
if (!isSelecting && focusedEntries.length > 0) updateDragImage();
|
||||||
else if (focusedEntries.length === 0) {
|
else if (focusedEntries.length === 0) {
|
||||||
adjustedCaptureOffsetRef.current = false;
|
adjustedCaptureOffsetRef.current = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user