dnd.js 815 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { Mimes } from '../common/mime.js';
  2. // Common data transfers
  3. export const DataTransfers = {
  4. /**
  5. * Application specific resource transfer type
  6. */
  7. RESOURCES: 'ResourceURLs',
  8. /**
  9. * Browser specific transfer type to download
  10. */
  11. DOWNLOAD_URL: 'DownloadURL',
  12. /**
  13. * Browser specific transfer type for files
  14. */
  15. FILES: 'Files',
  16. /**
  17. * Typically transfer type for copy/paste transfers.
  18. */
  19. TEXT: Mimes.text,
  20. /**
  21. * Application specific terminal transfer type.
  22. */
  23. TERMINALS: 'Terminals'
  24. };
  25. export class DragAndDropData {
  26. constructor(data) {
  27. this.data = data;
  28. }
  29. update() {
  30. // noop
  31. }
  32. getData() {
  33. return this.data;
  34. }
  35. }
  36. export const StaticDND = {
  37. CurrentDragAndDropData: undefined
  38. };