aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-09-27 12:31:45 -0400
committerbob <bcz@cs.brown.edu>2019-09-27 12:31:45 -0400
commitd9f5a6f88d75fe4037a7dacf62188649a5dd7a55 (patch)
treeb046286e84ff566e5987179bddcc324b515af156 /src
parentffe8282942e4c29f9b28b6423ca934fd17986270 (diff)
removed unneeded setTimeout in dragging
Diffstat (limited to 'src')
-rw-r--r--src/client/util/DragManager.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 00fc752ca..43c352a90 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -416,10 +416,9 @@ export namespace DragManager {
hideSource = options.hideSource();
}
}
- setTimeout(() =>
- eles.map(ele => (ele.hidden = hideSource) &&
- (ele.parentElement && ele.parentElement.className.indexOf("collectionFreeFormDocumentView") !== -1 && (ele.parentElement.hidden = hideSource))),
- 0);
+
+ // we're dragging a documentView, but it may be a child of a CollectionFreeFormDocumentView. If it is, we want to hide that as well -- this should be generalized somehow in case other draggable things might contain a DocumentView.
+ eles.map(ele => (ele.hidden = hideSource));
let lastX = downX;
let lastY = downY;