From bdccc7c147dbb985bff5286e318718e48fd7cc62 Mon Sep 17 00:00:00 2001 From: Geireann <60007097+geireann@users.noreply.github.com> Date: Tue, 15 Feb 2022 16:06:18 -0500 Subject: updates --- .../views/collections/CollectionStackingView.tsx | 34 ++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'src/client/views/collections/CollectionStackingView.tsx') diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index cdc680a08..ad3f3b217 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -65,6 +65,7 @@ export class CollectionStackingView extends CollectionSubView +
+ {/* We'll want to add an onPointerDown that uses DragManager.DocumentDragData + -- we also want to remember to preventDefault (so other drag events are not recognized over this one) + -- Design discussion as to whether we want dragging to be on the document itself or with a drag button + -- Do we want clicking on this button to do anything as well? + -- Design Question: Schema view also has the notion of a drag manager (different from this one), do we want + the same functionality? + -- Problem: This only shows when the outer container is selected... + */} +
+ e.stopPropagation()} /> +
+
{this.getDisplayDoc(d, width)} - ; + }); } @action @@ -275,7 +289,13 @@ export class CollectionStackingView extends CollectionSubView; } + @action + onPointerOver = (e: React.PointerEvent) => { + if (DragManager.docsBeingDragged.length){ + console.log(DragManager.docsBeingDragged[0].title) + } + } + @undoBatch @action onInternalDrop = (e: Event, de: DragManager.DropEvent) => { + console.log('drop') const where = [de.x, de.y]; let dropInd = -1; let dropAfter = 0; @@ -371,6 +399,7 @@ export class CollectionStackingView extends CollectionSubView => { + console.log('external drop') const where = [e.clientX, e.clientY]; let targInd = -1; this._docXfs.map((cd, i) => { @@ -600,6 +629,7 @@ export class CollectionStackingView extends CollectionSubView this._scroll = e.currentTarget.scrollTop)} + onPointerOver={this.onPointerOver} onDrop={this.onExternalDrop.bind(this)} onContextMenu={this.onContextMenu} onWheel={e => this.props.isContentActive(true) && e.stopPropagation()} > -- cgit v1.2.3-70-g09d2