UNPKG

react-beautiful-dnd

Version:

Beautiful, accessible drag and drop for lists with React.js

20 lines (16 loc) 520 B
// @flow import type { Area } from '../../types'; import getArea from '../get-area'; export default (): Area => { // would use window.scrollY and window.scrollX but it is not supported in ie11 const top: number = window.pageYOffset; const left: number = window.pageXOffset; const width: number = window.innerWidth; const height: number = window.innerHeight; // computed const right: number = left + width; const bottom: number = top + height; return getArea({ top, left, right, bottom, }); };