diff options
| author | bobzel <zzzman@gmail.com> | 2022-08-03 13:33:38 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-08-03 13:33:38 -0400 |
| commit | 55bac585fa0b8d6c3f513ccecb22456d1d361040 (patch) | |
| tree | 3c4886b07ba775e656f264874d8552992f087abd /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 4ad4936393d11227934fdda2c18bea3446b20795 (diff) | |
fixes for dragging notes so that they highlight properly and go to the right place when embedded in freeform views.
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index 1927db51e..ef68cadd7 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -447,8 +447,6 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection const newDocs = droppedDocs.length ? droppedDocs : de.complete.docDragData.droppedDocuments; // if nothing was added to the end of the list, then presumably the dropped documents were already in the list, but possibly got reordered so we use them. const docs = this.childDocList; - // reset drag manager docs, because we just dropped - DragManager.docsBeingDragged = []; // still figuring out where to add the document if (docs && newDocs.length) { const insertInd = dropInd === -1 ? docs.length : dropInd + dropAfter; @@ -456,6 +454,8 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection newDocs.filter(ndoc => docs.indexOf(ndoc) !== -1).forEach(ndoc => docs.splice(docs.indexOf(ndoc), 1)); docs.splice(insertInd - offset, 0, ...newDocs); } + // reset drag manager docs, because we just dropped + DragManager.docsBeingDragged.length = 0; } } else if (de.complete.linkDragData?.dragDocument.context === this.props.Document && de.complete.linkDragData?.linkDragView?.props.CollectionFreeFormDocumentView?.()) { const source = Docs.Create.TextDocument('', { _width: 200, _height: 75, _fitWidth: true, title: 'dropped annotation' }); |
