UNPKG

@atlaskit/pragmatic-drag-and-drop-hitbox

Version:

An optional package for Pragmatic drag and drop that enables the attaching of interaction information to a drop target

20 lines • 443 B
import { reorder } from '@atlaskit/pragmatic-drag-and-drop/utils/reorder'; import { getReorderDestinationIndex } from './get-reorder-destination-index'; export function reorderWithEdge({ list, startIndex, closestEdgeOfTarget, indexOfTarget, axis }) { return reorder({ list, startIndex, finishIndex: getReorderDestinationIndex({ closestEdgeOfTarget, startIndex, indexOfTarget, axis }) }); }