aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DragManager.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-02-06 09:25:50 -0500
committerbob <bcz@cs.brown.edu>2020-02-06 09:25:50 -0500
commit714e66d2916971b5b023ba33c20b8794c1d536e2 (patch)
tree56c65f8490305e70635df0aa7726c98a73f6c452 /src/client/util/DragManager.ts
parentbc2798dbab082c381f7af1aa7b5ed2b6027c45aa (diff)
fixed unsetting of dropAction in buxton layouts.
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r--src/client/util/DragManager.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index c05a2de96..b0dd90947 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -15,7 +15,7 @@ import { listSpec } from "../../new_fields/Schema";
import { Scripting } from "./Scripting";
import { convertDropDataToButtons } from "./DropConverter";
-export type dropActionType = "alias" | "copy" | undefined;
+export type dropActionType = "alias" | "copy" | "move" | undefined;
export function SetupDrag(
_reference: React.RefObject<HTMLElement>,
docFunc: () => Doc | Promise<Doc> | undefined,
@@ -197,7 +197,10 @@ export namespace DragManager {
dragData.userDropAction === "copy" || (!dragData.userDropAction && dragData.dropAction === "copy") ? Doc.MakeCopy(d, true) : d)
);
e.docDragData?.droppedDocuments.forEach((drop: Doc, i: number) =>
- Cast(dragData.draggedDocuments[i].removeDropProperties, listSpec("string"), []).map(prop => drop[prop] = undefined));
+ Cast(dragData.draggedDocuments[i].removeDropProperties, listSpec("string"), []).map(prop => {
+ drop[prop] = "move";
+ })
+ );
};
dragData.draggedDocuments.map(d => d.dragFactory); // does this help? trying to make sure the dragFactory Doc is loaded
StartDrag(eles, dragData, downX, downY, options, finishDrag);