diff options
| author | bobzel <zzzman@gmail.com> | 2023-03-23 19:18:33 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-03-23 19:18:33 -0400 |
| commit | e4e1e346d2d0959336406edfda79c46b45787d25 (patch) | |
| tree | 412e79dce8d34718737af8c6f01bd7bef5d6a531 /src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | |
| parent | 8cbe8e5a1375e9e762b4893a2af71e4b2d22f11d (diff) | |
got rid of right resizer in schema view columns
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionSchema/CollectionSchemaView.tsx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx index d079bf839..28e0b07a4 100644 --- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx +++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx @@ -238,25 +238,22 @@ export class CollectionSchemaView extends CollectionSubView() { }; @action - startResize = (e: any, index: number, left: boolean) => { + startResize = (e: any, index: number) => { this._displayColumnWidths = this.storedColumnWidths; - setupMoveUpEvents(this, e, (e, delta) => this.resizeColumn(e, index, left), this.finishResize, emptyFunction); + setupMoveUpEvents(this, e, (e, delta) => this.resizeColumn(e, index), this.finishResize, emptyFunction); }; @action - resizeColumn = (e: PointerEvent, index: number, left: boolean) => { + resizeColumn = (e: PointerEvent, index: number) => { if (this._displayColumnWidths) { let shrinking; let growing; let change = e.movementX; - if (left && index !== 0) { + if (index !== 0) { growing = change < 0 ? index : index - 1; shrinking = change < 0 ? index - 1 : index; - } else if (!left && index !== this.columnKeys.length - 1) { - growing = change > 0 ? index : index + 1; - shrinking = change > 0 ? index + 1 : index; } if (shrinking === undefined || growing === undefined) return true; |
