@atlaskit/pragmatic-drag-and-drop-auto-scroll
Version:
An optional Pragmatic drag and drop package that enables automatic scrolling during a drag operation
10 lines • 336 B
JavaScript
export 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
);
}