MCPcopy Create free account
hub / github.com/ShareDropio/sharedrop / drop

Function drop

app/components/peer-avatar.js:86–104  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

84 },
85
86 drop(event) {
87 this.cancelEvent(event);
88 $(this.element).parent('.avatar').removeClass('hover');
89
90 const { peer } = this;
91 const dt = event.originalEvent.dataTransfer;
92 const { files } = dt;
93
94 if (this.canSendFile()) {
95 if (!this.isTransferableBundle(files)) {
96 peer.setProperties({
97 state: 'error',
98 errorCode: 'multiple-files',
99 });
100 } else {
101 this.onFileDrop({ files });
102 }
103 }
104 },
105
106 cancelEvent(event) {
107 event.stopPropagation();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected