From c97070d2a754aa30a1352cf938add2a2b2a4060a Mon Sep 17 00:00:00 2001 From: bob Date: Thu, 6 Jun 2019 16:28:04 -0400 Subject: from last --- src/client/views/collections/CollectionStackingView.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index 50194ba95..ddd9471ab 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -81,13 +81,12 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) { let dref = React.createRef(); let script = undefined; let colWidth = () => d.nativeWidth ? Math.min(d[WidthSym](), this.columnWidth) : this.columnWidth; - let margin = colWidth() < this.columnWidth ? "auto" : undefined; let rowHeight = () => this.singleColDocHeight(d); let dxf = () => this.getDocTransform(d, dref.current!).scale(this.columnWidth / d[WidthSym]()); return
+ style={{ marginTop: `${i ? this.yMargin : 0}px`, width: colWidth(), height: rowHeight(), marginLeft: "auto", marginRight: "auto" }} > doc) { render() { let leftMargin = this.xMargin; let topMargin = this.yMargin; - let itemCols = Math.ceil(this.columnWidth / (this._gridSize + this.gridGap)); + let itemCols = Math.floor(this.columnWidth / (this._gridSize + this.gridGap)); let cells = Math.floor((this.props.PanelWidth() - 2 * leftMargin) / (itemCols * (this._gridSize + this.gridGap))); return (
e.stopPropagation()}>