aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingView.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-07-29 11:27:58 -0400
committerFawn <fangrui_tong@brown.edu>2019-07-29 11:27:58 -0400
commit7ea25f83dfcb3fb31bf6fce1f4112c8bded294e2 (patch)
tree1d3cfa0d5f8e3424423c1ed5fdfc06c027c2df48 /src/client/views/collections/CollectionStackingView.tsx
parent7098f381f3f93e77880f3589427c81e61a5ee25a (diff)
parente7ea2028f54787d6c92fb22b789f17b7268d3793 (diff)
fixed sub collections having wrong children
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index b96b1f8c8..f647da8f0 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -140,12 +140,12 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {
previewScript={undefined}>
</CollectionSchemaPreview>;
}
- getDocHeight(d: Doc) {
+ getDocHeight(d: Doc, columnScale: number = 1) {
let nw = NumCast(d.nativeWidth);
let nh = NumCast(d.nativeHeight);
if (!BoolCast(d.ignoreAspect) && nw && nh) {
let aspect = nw && nh ? nh / nw : 1;
- let wid = Math.min(d[WidthSym](), this.columnWidth);
+ let wid = Math.min(d[WidthSym](), this.columnWidth / columnScale);
return wid * aspect;
}
return d[HeightSym]();