Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed Sep 9, 2024
1 parent b71a456 commit df4a396
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions frontend/src/lib/components/SortableList/sortableList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,6 @@ export function SortableList(props: SortableListProps): React.ReactNode {
return { element, area: getHoveredAreaOfItem(element, e) };
}
}
const directChildren = elements.filter((el) => el.parentElement === currentListDivRef);
if (
mainDivRef.current &&
rectContainsPoint(mainDivRef.current.getBoundingClientRect(), vec2FromPointerEvent(e))
) {
return { element: directChildren[directChildren.length - 1], area: HoveredArea.BOTTOM };
}

// If no element was found, check if the pointer is in the bottom area of the main list
const directChildren = elements.filter((el) => el.parentElement === currentListDivRef);
Expand Down

0 comments on commit df4a396

Please sign in to comment.