From d20a21384fc685082955cfbb9deb9c0f1176e7ad Mon Sep 17 00:00:00 2001
From: bob <bcz@cs.brown.edu>
Date: Fri, 31 Jan 2020 18:30:42 -0500
Subject: added multirow collection.  cleaned up CollectionTimeview a bit.

---
 .../collectionFreeForm/CollectionFreeFormLayoutEngines.tsx       | 9 +++++++--
 1 file changed, 7 insertions(+), 2 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 8a1147c61..6e4af3520 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx
@@ -10,7 +10,6 @@ import { ObservableMap, runInAction } from "mobx";
 import { Id, ToString } from "../../../../new_fields/FieldSymbols";
 import { ObjectField } from "../../../../new_fields/ObjectField";
 import { RefField } from "../../../../new_fields/RefField";
-import { createPromiseCapability } from "../../../../../deploy/assets/pdf.worker";
 
 interface PivotData {
     type: string;
@@ -142,8 +141,11 @@ export function computeTimelineLayout(
     poolData: ObservableMap<string, any>,
     pivotDoc: Doc,
     childDocs: Doc[],
-    childPairs: { layout: Doc, data?: Doc }[], panelDim: number[], viewDefsToJSX: (views: any) => ViewDefResult[]
+    childPairs: { layout: Doc, data?: Doc }[],
+    panelDim: number[],
+    viewDefsToJSX: (views: any) => ViewDefResult[]
 ) {
+    const fieldKey = "data";
     const pivotAxisWidth = NumCast(pivotDoc.pivotWidth, 200);
     const pivotDateGroups = new Map<number, Doc[]>();
 
@@ -159,6 +161,9 @@ export function computeTimelineLayout(
         minTime = Math.min(num, minTime);
         maxTime = Math.max(num, maxTime);
     }
+    minTime = NumCast(pivotDoc[fieldKey + "-timelineMin"], minTime);
+    maxTime = NumCast(pivotDoc[fieldKey + "-timelineMax"], maxTime);
+    const curTime = Cast(pivotDoc[fieldKey + "-timelineCur"], "number", null);
 
     const docMap = new Map<Doc, ViewDefBounds>();
     const groupNames: PivotData[] = [];
-- 
cgit v1.2.3-70-g09d2

