From 6b1e9b68c3d409df6ea2a8909b99d5d8d75226c5 Mon Sep 17 00:00:00 2001
From: bob <bcz@cs.brown.edu>
Date: Wed, 22 Jan 2020 12:53:40 -0500
Subject: various fixes to pivot view related things.

---
 .../collectionFreeForm/CollectionFreeFormLayoutEngines.tsx          | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
index 5c6336248..32097816d 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
@@ -59,11 +59,7 @@ export function computePivotLayout(poolData: ObservableMap<string, any>, pivotDo
     let numCols = NumCast(pivotDoc.pivotNumColumns, Math.ceil(Math.sqrt(minSize)));
     const docMap = new Map<Doc, ViewDefBounds>();
     const groupNames: PivotData[] = [];
-    if (panelDim[0] < 2500) numCols = Math.min(5, numCols);
-    if (panelDim[0] < 2000) numCols = Math.min(4, numCols);
-    if (panelDim[0] < 1400) numCols = Math.min(3, numCols);
-    if (panelDim[0] < 1000) numCols = Math.min(2, numCols);
-    if (panelDim[0] < 600) numCols = 1;
+    numCols = Math.min(panelDim[0] / pivotAxisWidth, numCols)
 
     const expander = 1.05;
     const gap = .15;
-- 
cgit v1.2.3-70-g09d2

