From 5a7ec36e558bdf5333cb7c16faad8f31bfcf314e Mon Sep 17 00:00:00 2001 From: eeng5 Date: Tue, 27 Aug 2019 11:53:00 -0400 Subject: fixed autoheight for masonry --- .../views/collections/CollectionMasonryViewFieldRow.tsx | 13 ++++++------- src/client/views/collections/CollectionStackingView.tsx | 3 +-- .../views/collections/CollectionStackingViewFieldColumn.tsx | 1 - 3 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx index bae2a1ff4..1c1e44bb5 100644 --- a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx +++ b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx @@ -33,7 +33,6 @@ interface CMVFieldRowProps { type: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | undefined; createDropTarget: (ele: HTMLDivElement) => void; screenToLocalTransform: () => Transform; - color: string | undefined; } @observer @@ -274,7 +273,7 @@ export class CollectionMasonryViewFieldRow extends React.Component "", @@ -283,10 +282,10 @@ export class CollectionMasonryViewFieldRow extends React.Component + let headingView = this.props.headingObject ? +
}
-
; + : (null); return (
doc) { (this.Sections.size ? 50 : 0) + s.reduce((height, d, i) => height + this.childDocHeight(d) + (i === s.length - 1 ? this.yMargin : this.gridGap), this.yMargin)), 0); } else { return this.props.ContentScaling() * sectionsList.reduce((totalHeight, s) => totalHeight + - (this.Sections.size ? 50 : 0) + s.reduce((height, d, i) => height + this.childDocHeight(d) + (i === s.length - 1 ? this.yMargin : this.gridGap), this.yMargin) + 40, 0); + (this.Sections.size ? 50 : 0) + s.reduce((height, d, i) => height + this.childDocHeight(d) + (i === s.length - 1 ? this.yMargin : this.gridGap), this.yMargin) + 47, 0); } } return -1; @@ -313,7 +313,6 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { type={type} createDropTarget={this.createDropTarget} screenToLocalTransform={this.props.ScreenToLocalTransform} - color={heading ? heading.color : ""} />; } diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx index 4ec968438..c0c4750eb 100644 --- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx +++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx @@ -23,7 +23,6 @@ import "./CollectionStackingView.scss"; library.add(faPalette); - interface CSVFieldColumnProps { cols: () => number; headings: () => object[]; -- cgit v1.2.3-70-g09d2