diff options
author | bobzel <zzzman@gmail.com> | 2020-10-17 17:47:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-17 17:47:10 -0400 |
commit | cf79470be23ae7f79e5cfc86bc4833bb80c3668a (patch) | |
tree | 594c95b048c6a36c2027d476b8ac6a3e86455535 /src/client/util/DragManager.ts | |
parent | 223262242f7db021c8449e920645892cc5ed2820 (diff) | |
parent | 0721e65bc4403b96a8f905c93b51c6eda2371e4a (diff) |
Merge pull request #869 from browngraphicslab/presentation_v1
Presentation v1
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 3a0f306f3..9e91b4f55 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -201,7 +201,14 @@ export namespace DragManager { } // drag a document and drop it (or make an alias/copy on drop) - export function StartDocumentDrag(eles: HTMLElement[], dragData: DocumentDragData, downX: number, downY: number, options?: DragOptions) { + export function StartDocumentDrag( + eles: HTMLElement[], + dragData: DocumentDragData, + downX: number, + downY: number, + options?: DragOptions, + dropEvent?: () => any + ) { const addAudioTag = (dropDoc: any) => { dropDoc && !dropDoc.creationDate && (dropDoc.creationDate = new DateField); dropDoc instanceof Doc && DocUtils.MakeLinkToActiveAudio(dropDoc); @@ -209,6 +216,7 @@ export namespace DragManager { }; const finishDrag = (e: DragCompleteEvent) => { const docDragData = e.docDragData; + if (dropEvent) dropEvent(); // glr: optional additional function to be called - in this case with presentation trails if (docDragData && !docDragData.droppedDocuments.length) { docDragData.dropAction = dragData.userDropAction || dragData.dropAction; docDragData.droppedDocuments = |