diff options
| author | bob <bcz@cs.brown.edu> | 2019-02-25 17:36:12 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-02-25 17:36:12 -0500 |
| commit | 79c86272093efc8416619575280f178982f5c449 (patch) | |
| tree | ef14acabc0a34ef1d0c4b60bb6951092989c93b4 /src/client/views/collections/CollectionSchemaView.tsx | |
| parent | bb418216efa9cc2e191b970e4cbe5080f4fd2b87 (diff) | |
tweaks
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index d5b82cbb6..38217d7c4 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -61,12 +61,14 @@ export class CollectionSchemaView extends CollectionViewBase { document.removeEventListener('pointerup', onRowUp); }); let onRowDown = (e: React.PointerEvent) => { - if (e.shiftKey) { - CollectionDockingView.Instance.StartOtherDrag(reference.current!, props.doc); - e.stopPropagation(); - } else { - document.addEventListener("pointermove", onRowMove); - document.addEventListener('pointerup', onRowUp); + if (this.props.isSelected() || this.props.isTopMost) { + if (e.shiftKey) { + CollectionDockingView.Instance.StartOtherDrag(reference.current!, props.doc); + e.stopPropagation(); + } else { + document.addEventListener("pointermove", onRowMove); + document.addEventListener('pointerup', onRowUp); + } } } return ( |
