From 8e25ea949c63e80fecd53c9d86b0c2ea568f3468 Mon Sep 17 00:00:00 2001
From: Sam Wilkins <samwilkins333@gmail.com>
Date: Tue, 26 May 2020 11:04:40 -0700
Subject: tweak

---
 src/client/views/collections/collectionGrid/CollectionGridView.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/collectionGrid/CollectionGridView.tsx')

diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
index 26be4bee8..4a3596190 100644
--- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx
+++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx
@@ -49,8 +49,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
                     if (!gridLayouts.find((gridLayout: Doc) => StrCast(gridLayout.i) === targetId)) {
                         const layoutDoc: Doc = new Doc();
                         layoutDoc.i = targetId;
-                        layoutDoc.w = 2;
-                        layoutDoc.h = 2;
+                        layoutDoc.w = layoutDoc.h = 2;
                         this.findNextLayout(layoutDoc, previousLength);
                         Doc.AddDocToList(this.props.Document, "gridLayouts", layoutDoc);
                     }
@@ -85,7 +84,7 @@ export class CollectionGridView extends CollectionSubView(GridSchema) {
      * as big as the ratio height of the document you're trying to insert.  
      */
     private findNextLayout(layoutDoc: Doc, previousLength: number) {
-        layoutDoc.x = 2 * (previousLength % 5);
+        layoutDoc.x = 2 * (previousLength % 5); // does this assume that there are 5 columns?
         layoutDoc.y = 2 * Math.floor(previousLength / 5);
     }
 
-- 
cgit v1.2.3-70-g09d2

