diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-18 09:13:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-18 09:13:22 -0400 |
| commit | fc2db492d6ffd827b24323423810cae4a29fdf67 (patch) | |
| tree | 3024db387ae6f5a103d9f7d79384d074f9d6a1af /src/client/views/collections/collectionGrid | |
| parent | 2563f68413594248823b26e68aa3b866ab1566a4 (diff) | |
| parent | 582aba648e2865c3aa16db314b912a304a1834d3 (diff) | |
Merge pull request #633 from browngraphicslab/acls_uv
Grid view bug fix
Diffstat (limited to 'src/client/views/collections/collectionGrid')
| -rw-r--r-- | src/client/views/collections/collectionGrid/CollectionGridView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx index e6ac7021a..70ebca5e7 100644 --- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx +++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx @@ -94,8 +94,8 @@ export class CollectionGridView extends CollectionSubView(GridSchema) { */ unflexedPosition(index: number): Omit<Layout, "i"> { return { - x: (index % Math.floor(this.numCols / this.defaultW)) * this.defaultW, - y: Math.floor(index / Math.floor(this.numCols / this.defaultH)) * this.defaultH, + x: (index % (Math.floor(this.numCols / this.defaultW) || 1)) * this.defaultW, + y: Math.floor(index / (Math.floor(this.numCols / this.defaultH) || 1)) * this.defaultH, w: this.defaultW, h: this.defaultH, static: true |
