From fc4dd8c7d361bc848b6b27c67d5da26b8aab408e Mon Sep 17 00:00:00 2001
From: bob <bcz@cs.brown.edu>
Date: Fri, 17 Jan 2020 10:58:19 -0500
Subject: adjustments to multiColumnView to support templates

---
 src/client/views/collections/CollectionMulticolumnView.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

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

diff --git a/src/client/views/collections/CollectionMulticolumnView.tsx b/src/client/views/collections/CollectionMulticolumnView.tsx
index 19a7b1123..157c5e367 100644
--- a/src/client/views/collections/CollectionMulticolumnView.tsx
+++ b/src/client/views/collections/CollectionMulticolumnView.tsx
@@ -40,9 +40,9 @@ export class CollectionMulticolumnView extends CollectionSubView(MulticolumnDocu
     private get resolvedLayoutInformation(): LayoutData {
         const unresolved: Unresolved[] = [];
         let starSum = 0, numFixed = 0, numRatio = 0;
-        for (const target of this.childDocs) {
-            const unit = StrCast(target.widthUnit);
-            const magnitude = NumCast(target.widthMagnitude);
+        for (const pair of this.childLayoutPairs) {
+            const unit = StrCast(pair.layout.widthUnit);
+            const magnitude = NumCast(pair.layout.widthMagnitude);
             if (unit && magnitude && magnitude > 0 && resolvedUnits.includes(unit)) {
                 if (unit === "*") {
                     starSum += magnitude;
@@ -50,7 +50,7 @@ export class CollectionMulticolumnView extends CollectionSubView(MulticolumnDocu
                 } else {
                     numFixed++;
                 }
-                unresolved.push({ target, magnitude, unit });
+                unresolved.push({ target: pair.layout, magnitude, unit });
             }
             // otherwise, the particular configuration entry is ignored and the remaining
             // space is allocated as if the document were absent from the configuration list
@@ -132,7 +132,7 @@ export class CollectionMulticolumnView extends CollectionSubView(MulticolumnDocu
                         {...this.props}
                         key={Utils.GenerateGuid()}
                         Document={target}
-                        DataDocument={undefined}
+                        DataDocument={target.resolvedDataDoc as Doc}
                         PanelWidth={() => pixels}
                         getTransform={this.props.ScreenToLocalTransform}
                     />
-- 
cgit v1.2.3-70-g09d2

