aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DragManager.ts
diff options
context:
space:
mode:
authorMonika Hedman <monika_hedman@brown.edu>2019-02-24 16:26:14 -0500
committerMonika Hedman <monika_hedman@brown.edu>2019-02-24 16:26:14 -0500
commitb119b7d4b38c3eada66e4ac49f1d65dfae6b22c0 (patch)
treeae38ab0d33da6354d0777c4f159363d3f3783e45 /src/client/util/DragManager.ts
parent1447bcdb79425d2e520ca39732d600466deb242c (diff)
parentd9d55e422826da1fe87aa7973c92e54bc0c99f02 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into navigation
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r--src/client/util/DragManager.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 337ec855a..eb4b3aeaa 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -1,3 +1,4 @@
+import { DocumentDecorations } from "../views/DocumentDecorations";
export namespace DragManager {
export function Root() {
@@ -43,6 +44,7 @@ export namespace DragManager {
drop: (e: Event, de: DropEvent) => void;
}
+
export function MakeDropTarget(element: HTMLElement, options: DropOptions): DragDropDisposer {
if ("canDrop" in element.dataset) {
throw new Error("Element is already droppable, can't make it droppable again");
@@ -59,10 +61,8 @@ export namespace DragManager {
};
}
-
- let _lastPointerX: number = 0;
- let _lastPointerY: number = 0;
export function StartDrag(ele: HTMLElement, dragData: { [id: string]: any }, options: DragOptions) {
+ DocumentDecorations.Instance.Hidden = true;
if (!dragDiv) {
dragDiv = document.createElement("div");
DragManager.Root().appendChild(dragDiv);
@@ -131,5 +131,6 @@ export namespace DragManager {
}
}));
options.handlers.dragComplete({});
+ DocumentDecorations.Instance.Hidden = false;
}
} \ No newline at end of file