Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbbb committed Jan 6, 2025
1 parent 9f71e17 commit 3fe3ed8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/components/drag-and-drop/DndProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ export const DndProvider = forwardRef<DndProviderHandle, PropsWithChildren<DndPr
.enabled(!disabled)
.onStart(event => {
const { state, x, y } = event;

debug && console.log('onStart', { state, x, y });

const activeId = findActiveLayoutId({ x, y });

// No item found, ignore gesture.
Expand All @@ -210,7 +208,6 @@ export const DndProvider = forwardRef<DndProviderHandle, PropsWithChildren<DndPr
const { value: layouts } = draggableLayouts;
const { value: offsets } = draggableOffsets;
const { value: restingOffsets } = draggableRestingOffsets;
// const { value: options } = draggableOptions;
const { value: states } = draggableStates;

const activeLayout = layouts[activeId].value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ export const useDraggableSort = ({
const { value: offsets } = draggableOffsets;
const { value: sortOrder } = draggableSortOrder;
const activeIndex = sortOrder.findIndex(id => id === activeId);
// const activeCenterPoint = centerPoint(activeLayout);
// console.log(`activeLayout: ${JSON.stringify(activeLayout)}`);
for (let itemIndex = 0; itemIndex < sortOrder.length; itemIndex++) {
const itemId = sortOrder[itemIndex];
if (itemId === activeId) {
Expand All @@ -58,7 +56,6 @@ export const useDraggableSort = ({
});

if (shouldSwapWorklet(activeLayout, itemLayout, direction)) {
// console.log(`Found placeholder index ${itemIndex} using custom shouldSwapWorklet!`);
return itemIndex;
}
}
Expand Down

0 comments on commit 3fe3ed8

Please sign in to comment.