UNPKG

@atlaskit/pragmatic-drag-and-drop-auto-scroll

Version:

An optional Pragmatic drag and drop package that enables automatic scrolling during a drag operation

16 lines (15 loc) • 438 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isWithin = isWithin; function isWithin(_ref) { var client = _ref.client, clientRect = _ref.clientRect; return ( // is within horizontal bounds client.x >= clientRect.x && client.x <= clientRect.x + clientRect.width && // is within vertical bounds client.y >= clientRect.y && client.y <= clientRect.y + clientRect.height ); }