Skip to content

Commit

Permalink
Merge pull request #10879 from DestinyItemManager/remove-drag-perf
Browse files Browse the repository at this point in the history
Remove drag perf fix?
  • Loading branch information
bhollis authored Dec 31, 2024
2 parents 95c583c + 5ae890b commit ad43dc0
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 66 deletions.
2 changes: 0 additions & 2 deletions src/app/inventory-page/Inventory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { DestinyAccount } from 'app/accounts/destiny-account';
import ShowPageLoading from 'app/dim-ui/ShowPageLoading';
import GearPower from 'app/gear-power/GearPower';
import { t } from 'app/i18next-t';
import DragPerformanceFix from 'app/inventory/DragPerformanceFix';
import { useLoadStores } from 'app/inventory/store/hooks';
import { MaterialCountsSheet } from 'app/material-counts/MaterialCountsWrappers';
import { usePageTitle } from 'app/utils/hooks';
Expand All @@ -19,7 +18,6 @@ export default function Inventory({ account }: { account: DestinyAccount }) {
return (
<>
<Stores />
<DragPerformanceFix />
{account.destinyVersion === 2 && <GearPower />}
{account.destinyVersion === 2 && <MaterialCountsSheet />}
</>
Expand Down
19 changes: 0 additions & 19 deletions src/app/inventory-page/StoreBucket.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@
padding: 0;
}

&::before {
content: '';

opacity: 0;

width: 100%;
height: 100%;

position: absolute;

z-index: 9;

display: none;

.drag-perf-show & {
display: block;
}
}

&.equipped {
display: flex;
flex-direction: column;
Expand Down
5 changes: 0 additions & 5 deletions src/app/inventory-page/StoreBucketDropTarget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ interface Props {
grouped: boolean;
}

const onClick = () => {
document.body.classList.remove('drag-perf-show');
};

export default function StoreBucketDropTarget({
storeId,
children,
Expand Down Expand Up @@ -68,7 +64,6 @@ export default function StoreBucketDropTarget({
[styles.canDrop]: canDrop,
[styles.grouped]: grouped,
})}
onClick={onClick}
aria-label={bucket.name}
>
{children}
Expand Down
17 changes: 0 additions & 17 deletions src/app/inventory/DragPerformanceFix.scss

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/inventory/DragPerformanceFix.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions src/app/inventory/DraggableInventoryItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ interface Props {
children?: React.ReactNode;
}

let dragTimeout: number | null = null;

export default function DraggableInventoryItem({ children, item, anyBucket = false }: Props) {
const canDrag =
(!item.location.inPostmaster || item.destinyVersion === 2) && item.notransfer
Expand All @@ -30,19 +28,10 @@ export default function DraggableInventoryItem({ children, item, anyBucket = fal
: item.bucket.hash.toString(),
item: () => {
hideItemPopup();

dragTimeout = requestAnimationFrame(() => {
dragTimeout = null;
document.body.classList.add('drag-perf-show');
});
isDragging$.next(true);
return item;
},
end: () => {
if (dragTimeout !== null) {
cancelAnimationFrame(dragTimeout);
}
document.body.classList.remove('drag-perf-show');
isDragging$.next(false);
},
canDrag,
Expand Down

0 comments on commit ad43dc0

Please sign in to comment.