CanvasDnDAPI.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. "use strict";
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Business Analytics (C) Copyright IBM Corp. 2019
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class CanvasDnDAPI
  10. * @hideconstructor
  11. * @classdesc API class that handles drag and drop on a canvas
  12. */
  13. define([], function () {
  14. return function () {
  15. function CanvasDnDAPI() {
  16. _classCallCheck(this, CanvasDnDAPI);
  17. }
  18. /**
  19. * @function CanvasDnDAPI#registerProvider
  20. * @description Register a provider to handle drag and drop
  21. * @param {provider} provider provider to handle drag and drop
  22. */
  23. CanvasDnDAPI.prototype.registerProvider = function registerProvider() {};
  24. /**
  25. * @public
  26. * @function CanvasDnDAPI#accepts
  27. * @param {Object} payload the drag and drop payload
  28. * @description called by the DnD manager to check whether to accept the dragged object or not
  29. * @returns {Boolean}
  30. */
  31. CanvasDnDAPI.prototype.accepts = function accepts() {};
  32. /**
  33. * @public
  34. * @function CanvasDnDAPI#onDrop
  35. * @param {Object} payload the drag and drop payload
  36. * @param {Object} targetNode the DOM target node to accept the drop
  37. * @param {Object} event the jQuery event object
  38. * @description process the on drop action of drag and drop
  39. */
  40. CanvasDnDAPI.prototype.onDrop = function onDrop() {};
  41. return CanvasDnDAPI;
  42. }();
  43. });
  44. //# sourceMappingURL=CanvasDnDAPI.js.map