diff options
| author | Stanley Yip <stanley_yip@brown.edu> | 2019-10-15 16:30:00 -0400 | 
|---|---|---|
| committer | Stanley Yip <stanley_yip@brown.edu> | 2019-10-15 16:30:00 -0400 | 
| commit | 0be39316bd21939201ee0e15950cc7855c9c13ba (patch) | |
| tree | bfec698f48c0545b0ce2105d7f17c16513316a68 /src/client/util/DragManager.ts | |
| parent | aad42660123c227cbe2152fbbbc159f6a38fca17 (diff) | |
| parent | 33811c112c7e479813908ba10f72813954a3e289 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into interaction_stanley
Diffstat (limited to 'src/client/util/DragManager.ts')
| -rw-r--r-- | src/client/util/DragManager.ts | 7 | 
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index 2c316ccdf..92666c03c 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -234,9 +234,9 @@ export namespace DragManager {      export let StartDragFunctions: (() => void)[] = []; -    export async 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) {          runInAction(() => StartDragFunctions.map(func => func())); -        await dragData.draggedDocuments.map(d => d.dragFactory); +        dragData.draggedDocuments.map(d => d.dragFactory); // does this help?  trying to make sure the dragFactory Doc is loaded          StartDrag(eles, dragData, downX, downY, options, options && options.finishDrag ? options.finishDrag :              (dropData: { [id: string]: any }) => {                  (dropData.droppedDocuments = @@ -430,12 +430,13 @@ export namespace DragManager {              }              if (((options && !options.withoutShiftDrag) || !options) && e.shiftKey && CollectionDockingView.Instance) {                  AbortDrag(); +                finishDrag && finishDrag(dragData);                  CollectionDockingView.Instance.StartOtherDrag({                      pageX: e.pageX,                      pageY: e.pageY,                      preventDefault: emptyFunction,                      button: 0 -                }, docs); +                }, dragData.droppedDocuments);              }              //TODO: Why can't we use e.movementX and e.movementY?              let moveX = e.pageX - lastX;  | 
