UNPKG

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

Version:

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

18 lines (16 loc) • 652 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addScrollableAttribute = addScrollableAttribute; exports.selector = exports.dataAttribute = void 0; var dataAttribute = exports.dataAttribute = 'data-auto-scrollable'; // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports var selector = exports.selector = "[".concat(dataAttribute, "=\"true\"]"); // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports function addScrollableAttribute(element) { element.setAttribute(dataAttribute, 'true'); return function () { return element.removeAttribute(dataAttribute); }; }