UNPKG

@atlaskit/modal-dialog

Version:

A modal dialog displays content that requires user interaction, in a layer above the page.

31 lines (30 loc) 928 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.disableDraggingToCrossOriginIFramesForExternal = disableDraggingToCrossOriginIFramesForExternal; var _adapter = require("@atlaskit/pragmatic-drag-and-drop/external/adapter"); var _makeFixForAdapter = require("./make-fix-for-adapter"); function watchForInteractionStart(_ref) { var start = _ref.start; return (0, _adapter.monitorForExternal)({ onDragStart: function onDragStart() { start(); } }); } function watchForInteractionEnd(_ref2) { var stop = _ref2.stop; return (0, _adapter.monitorForExternal)({ onDrop: function onDrop() { stop(); } }); } var api = (0, _makeFixForAdapter.makeFixForAdapter)({ watchForInteractionStart: watchForInteractionStart, watchForInteractionEnd: watchForInteractionEnd }); function disableDraggingToCrossOriginIFramesForExternal() { return api.registerUsage(); }