diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index 570b614d8..7fcac09dc 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -151,7 +151,7 @@ export class CollectionSchemaView extends CollectionSubView() { return widths; } - @computed get heights() { + @computed get rowHeights() { const heights = this.childDocs.map(() => (this.rowHeightFunc())) return heights; } @@ -430,7 +430,7 @@ export class CollectionSchemaView extends CollectionSubView() { findRowDropIndex = (mouseY: number) => { let index: number = 0; - this.heights.reduce((total, curr, i) => { + this.rowHeights.reduce((total, curr, i) => { if (total <= mouseY && total + curr >= mouseY) { if (mouseY <= total + curr) index = i; else index = i + 1; @@ -517,7 +517,6 @@ export class CollectionSchemaView extends CollectionSubView() { this._selectedCol = col; if (this._lowestSelectedIndex === -1 || index < this._lowestSelectedIndex) this._lowestSelectedIndex = index; - console.log(this._lowestSelectedIndex) //let selectedIndexes: Array<Number> = this._selectedCells.map(doc => this.rowIndex(doc)); }; @@ -569,6 +568,7 @@ export class CollectionSchemaView extends CollectionSubView() { draggedDocs.forEach(doc => { DocumentManager.Instance.AddViewRenderedCb(doc, dv => dv.select(true)); }); + this._lowestSelectedIndex = Math.min(...draggedDocs?.map(doc => this.rowIndex(doc))); return true; } return false; |