/
githubmirror
/
react-beautiful-dnd
Обзор
Документация
Войти
/
githubmirror
/
react-beautiful-dnd
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/view/window/get-max-window-scroll.js
19 строк
547 B
Alex Reardon
Viewport dimensions (#1068)
25 янв 2019, 07:39
Не верифицирован
25 янв 2019, 07:39
b0089d6
Код
Авторство
О чём код?
// @flow import type { Position } from 'css-box-model'; import getMaxScroll from '../../state/get-max-scroll'; import getDocumentElement from '../get-document-element'; export default (): Position => { const doc: HTMLElement = getDocumentElement(); const maxScroll: Position = getMaxScroll({ // unclipped padding box, with scrollbar scrollHeight: doc.scrollHeight, scrollWidth: doc.scrollWidth, // clipped padding box, without scrollbar width: doc.clientWidth, height: doc.clientHeight, }); return maxScroll; };