aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-11-14 19:47:17 -0500
committerbobzel <zzzman@gmail.com>2020-11-14 19:47:17 -0500
commitc440d2d48ca3ade4f7d3ac0a7f9f54eaacd4074d (patch)
tree5f8a7784ec3099fda6129013e30957fb711fbe18 /src/client/util
parentbf3b8e083815ef1a597da915d48675c2000d5f00 (diff)
fixed height of autoHeight masonry (tools panel was messed up showing nothing). fixed drag to hide the dragged feedback before hit testing which prevented dragging buttons from working. removed 'dropAction' from removeDropProperties on buttons
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/CurrentUserUtils.ts2
-rw-r--r--src/client/util/DragManager.ts5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index cae359362..202cd7b1f 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -494,7 +494,7 @@ export class CurrentUserUtils {
activeInkPen,
backgroundColor,
_hideContextMenu: true,
- removeDropProperties: new List<string>(["dropAction", "_stayInCollection"]),
+ removeDropProperties: new List<string>(["_stayInCollection"]),
_stayInCollection: true,
dragFactory,
clickFactory,
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 86e2d339e..e3019d288 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -127,7 +127,6 @@ export namespace DragManager {
droppedDocuments: Doc[];
dragDivName?: string;
treeViewDoc?: Doc;
- dontHideOnDrop?: boolean;
offset: number[];
canEmbed?: boolean;
userDropAction: dropActionType; // the user requested drop action -- this will be honored as specified by modifier keys
@@ -347,6 +346,7 @@ export namespace DragManager {
dragDiv.appendChild(dragLabel);
DragManager.Root().appendChild(dragDiv);
}
+ dragDiv.hidden = false;
dragLabel.style.display = "";
const scaleXs: number[] = [];
const scaleYs: number[] = [];
@@ -546,13 +546,14 @@ export namespace DragManager {
function dispatchDrag(dragEles: HTMLElement[], e: PointerEvent, dragData: { [index: string]: any },
xFromLeft: number, yFromTop: number, xFromRight: number, yFromBottom: number, options?: DragOptions, finishDrag?: (e: DragCompleteEvent) => void) {
- const removed = dragData.dontHideOnDrop ? [] : dragEles.map(dragEle => {
+ const removed = dragEles.map(dragEle => {
const ret = { ele: dragEle, w: dragEle.style.width, h: dragEle.style.height, o: dragEle.style.overflow };
dragEle.style.width = "0";
dragEle.style.height = "0";
dragEle.style.overflow = "hidden";
return ret;
});
+ dragDiv.hidden = true;
const target = document.elementFromPoint(e.x, e.y);
removed.map(r => {
r.ele.style.width = r.w;