diff options
| author | bob <bcz@cs.brown.edu> | 2020-02-06 11:09:52 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-02-06 11:09:52 -0500 |
| commit | 96307685adc3460f4269606b5f826854ce3cf280 (patch) | |
| tree | eaa3e769cb8da331c9e949e8623b473167eb1b81 /src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx | |
| parent | 0817d947b98b1b8e7f05df6b1d3db8eef4996ec9 (diff) | |
switch pivotField to _pivotField and fixed the sync script to be more general with timelines.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx index 84acbe0f0..d58925aab 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLayoutEngines.tsx @@ -85,7 +85,7 @@ export function computePivotLayout( const fieldKey = "data"; const pivotColumnGroups = new Map<FieldResult<Field>, Doc[]>(); - const pivotFieldKey = toLabel(pivotDoc.pivotField); + const pivotFieldKey = toLabel(pivotDoc._pivotField); for (const doc of childDocs) { const val = Field.toString(doc[pivotFieldKey] as Field); if (val) { @@ -191,7 +191,7 @@ export function computeTimelineLayout( const pivotDateGroups = new Map<number, Doc[]>(); const docMap = new Map<Doc, ViewDefBounds>(); const groupNames: PivotData[] = []; - const timelineFieldKey = Field.toString(pivotDoc.pivotField as Field); + const timelineFieldKey = Field.toString(pivotDoc._pivotField as Field); const curTime = Cast(pivotDoc[fieldKey + "-timelineCur"], "number", null); const curTimeSpan = Cast(pivotDoc[fieldKey + "-timelineSpan"], "number", null); const minTimeReq = curTime === undefined ? Cast(pivotDoc[fieldKey + "-timelineMinReq"], "number", null) : curTimeSpan && (curTime - curTimeSpan); |
