diff options
author | tschicke-brown <tyler_schicke@brown.edu> | 2019-05-09 19:25:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-09 19:25:58 -0400 |
commit | 6691c55623fff5194b5fd1a830096e3925281301 (patch) | |
tree | 2458827f32530528e306821db8fd37ced27ba7ef /src/client/util/DragManager.ts | |
parent | 39fd912fd4cd33f30a943290295a59992b9868eb (diff) | |
parent | e98dd0bf2ec4354daf95cc0d104cab1193fd4160 (diff) |
Merge pull request #128 from browngraphicslab/cursor_refactor
Cursor refactor
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r-- | src/client/util/DragManager.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts index eaf851a75..266679c16 100644 --- a/src/client/util/DragManager.ts +++ b/src/client/util/DragManager.ts @@ -158,9 +158,9 @@ export namespace DragManager { runInAction(() => StartDragFunctions.map(func => func())); StartDrag(eles, dragData, downX, downY, options, (dropData: { [id: string]: any }) => - (dropData.droppedDocuments = dragData.userDropAction == "alias" || (!dragData.userDropAction && dragData.dropAction == "alias") ? + (dropData.droppedDocuments = dragData.userDropAction === "alias" || (!dragData.userDropAction && dragData.dropAction === "alias") ? dragData.draggedDocuments.map(d => Doc.MakeAlias(d)) : - dragData.userDropAction == "copy" || (!dragData.userDropAction && dragData.dropAction == "copy") ? + dragData.userDropAction === "copy" || (!dragData.userDropAction && dragData.dropAction === "copy") ? dragData.draggedDocuments.map(d => Doc.MakeCopy(d, true)) : dragData.draggedDocuments)); } @@ -284,7 +284,7 @@ export namespace DragManager { }; let hideDragElements = () => { - dragElements.map(dragElement => dragElement.parentNode == dragDiv && dragDiv.removeChild(dragElement)); + dragElements.map(dragElement => dragElement.parentNode === dragDiv && dragDiv.removeChild(dragElement)); eles.map(ele => (ele.hidden = false)); }; let endDrag = () => { @@ -293,7 +293,7 @@ export namespace DragManager { if (options) { options.handlers.dragComplete({}); } - } + }; AbortDrag = () => { hideDragElements(); |