UNPKG

@atlaskit/pragmatic-drag-and-drop-hitbox

Version:

An optional package for Pragmatic drag and drop that enables the attaching of interaction information to a drop target

15 lines (14 loc) • 527 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.extractClosestEdge = extractClosestEdge; var _closestEdge = require("./closest-edge"); /** * Returns the value added by `attachClosestEdge()` to the `userData` object. It will return `null` if there is no value. */ // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports function extractClosestEdge(userData) { var _ref; return (_ref = userData[_closestEdge.uniqueKey]) !== null && _ref !== void 0 ? _ref : null; }