UNPKG

react-beautiful-dnd-next

Version:

Beautiful and accessible drag and drop for lists with React

14 lines (11 loc) 372 B
// @flow import { type Position } from 'css-box-model'; import { add } from '../position'; import type { Scrollable, DroppableDimension } from '../../types'; export default (droppable: DroppableDimension, point: Position): Position => { const frame: ?Scrollable = droppable.frame; if (!frame) { return point; } return add(point, frame.scroll.diff.value); };