aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DragManager.ts
diff options
context:
space:
mode:
authorAubrey-Li <63608597+Aubrey-Li@users.noreply.github.com>2021-08-03 16:57:25 -0700
committerAubrey-Li <63608597+Aubrey-Li@users.noreply.github.com>2021-08-03 16:57:25 -0700
commitfaa2449d0667507b5424984c0f1d70886d0cb025 (patch)
tree02a984b9b8fb2b8e3c4c93f102d9c4b700ff0fda /src/client/util/DragManager.ts
parentf4b910cc51c7c6b9c794d1b59198d132af3580b7 (diff)
parent0e8aef275346b4ba3bc1bb91fda17a335c307bf1 (diff)
Merge branch 'master' into trails-aubrey
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r--src/client/util/DragManager.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index c4842e88a..5e16de617 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -15,6 +15,15 @@ import { SnappingManager } from "./SnappingManager";
import { UndoManager } from "./UndoManager";
export type dropActionType = "alias" | "copy" | "move" | "same" | "proto" | "none" | undefined; // undefined = move, "same" = move but don't call removeDropProperties
+
+/**
+ * Initialize drag
+ * @param _reference: The HTMLElement that is being dragged
+ * @param docFunc: The Dash document being moved
+ * @param moveFunc: The function called when the document is moved
+ * @param dropAction: What to do with the document when it is dropped
+ * @param dragStarted: Method to call when the drag is started
+ */
export function SetupDrag(
_reference: React.RefObject<HTMLElement>,
docFunc: () => Doc | Promise<Doc> | undefined,