aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DragManager.ts
diff options
context:
space:
mode:
authormonikahedman <monika_hedman@brown.edu>2019-08-23 11:04:56 -0400
committermonikahedman <monika_hedman@brown.edu>2019-08-23 11:04:56 -0400
commitdd4227a125c0cd679f6437fab85b1cd772a34f78 (patch)
tree20f8b37248c3bbcdf68c3e6207f312d54798621b /src/client/util/DragManager.ts
parent1fb290bcc1c46214cfd553f31c1282d2694530ea (diff)
parent20f7d2dca1c115c84f6ac89981ef1e3c7c9a2757 (diff)
pulled from master
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r--src/client/util/DragManager.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 894b366ef..24c093213 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -140,6 +140,8 @@ export namespace DragManager {
withoutShiftDrag?: boolean;
+ finishDrag?: (dropData: { [id: string]: any }) => void;
+
offsetX?: number;
offsetY?: number;
@@ -234,7 +236,7 @@ export namespace DragManager {
export function StartDocumentDrag(eles: HTMLElement[], dragData: DocumentDragData, downX: number, downY: number, options?: DragOptions) {
runInAction(() => StartDragFunctions.map(func => func()));
- StartDrag(eles, dragData, downX, downY, options,
+ StartDrag(eles, dragData, downX, downY, options, options && options.finishDrag ? options.finishDrag :
(dropData: { [id: string]: any }) => {
(dropData.droppedDocuments = dragData.userDropAction === "alias" || (!dragData.userDropAction && dragData.dropAction === "alias") ?
dragData.draggedDocuments.map(d => Doc.MakeAlias(d)) :