aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-01-17 10:58:19 -0500
committerbob <bcz@cs.brown.edu>2020-01-17 10:58:19 -0500
commitfc4dd8c7d361bc848b6b27c67d5da26b8aab408e (patch)
tree5b29a8871e026b17d130d3862e7d9e90435b5959 /src
parent810f6b9b2737f3617910e498f577499fcbf3ffab (diff)
adjustments to multiColumnView to support templates
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionMulticolumnView.tsx10
1 files changed, 5 insertions, 5 deletions
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}
/>