aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionNoteTakingView.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx
index 1bf5b7d86..e0c79a265 100644
--- a/src/client/views/collections/CollectionNoteTakingView.tsx
+++ b/src/client/views/collections/CollectionNoteTakingView.tsx
@@ -369,8 +369,8 @@ export class CollectionNoteTakingView extends CollectionSubView<Partial<collecti
// This function is used to preview where a document will drop in a column once a drag is complete.
@action
- onPointerOver = (buttons: boolean, ex: number, ey: number) => {
- if (this.childDocList && buttons) {
+ onPointerMove = (force: boolean, ex: number, ey: number) => {
+ if (this.childDocList && (this.childDocList.includes(DragManager.DocDragData?.draggedDocuments.lastElement()!) || force || (SnappingManager.GetIsDragging() && DragManager.CanEmbed))) {
// get the current docs for the column based on the mouse's x coordinate
// will use again later, which is why we're saving as local
const xCoord = this.props.ScreenToLocalTransform().transformPoint(ex, ey)[0] - 2 * this.gridGap;
@@ -501,7 +501,7 @@ export class CollectionNoteTakingView extends CollectionSubView<Partial<collecti
onExternalDrop = async (e: React.DragEvent): Promise<void> => {
const targInd = this.docsDraggedRowCol?.[0] || 0;
super.onExternalDrop(e, {}, docus => {
- this.onPointerOver(true, e.clientX, e.clientY);
+ this.onPointerMove(true, e.clientX, e.clientY);
docus?.map(doc => this.addDocument(doc));
const newDoc = this.childDocs.lastElement();
const docs = this.childDocList;
@@ -707,7 +707,8 @@ export class CollectionNoteTakingView extends CollectionSubView<Partial<collecti
}}
onScroll={action(e => (this._scroll = e.currentTarget.scrollTop))}
onPointerLeave={action(e => (this.docsDraggedRowCol.length = 0))}
- onPointerOver={e => this.onPointerOver(e.buttons ? true : false, e.clientX, e.clientY)}
+ onPointerMove={e => e.buttons && this.onPointerMove(false, e.clientX, e.clientY)}
+ onDragOver={e => this.onPointerMove(true, e.clientX, e.clientY)}
onDrop={this.onExternalDrop.bind(this)}
onContextMenu={this.onContextMenu}
onWheel={e => this.props.isContentActive(true) && e.stopPropagation()}>