diff options
-rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index f06e0b551..96125f2c2 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -111,7 +111,7 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection // columnWidth handles the margin on the left and right side of the documents @computed get columnWidth() { const availableWidth = this._props.PanelWidth() - 2 * this.xMargin; - const cwid = availableWidth / NumCast(this.Document._layout_columnCount, 1); + const cwid = availableWidth / (NumCast(this.Document._layout_columnCount) || this._props.PanelWidth() / NumCast(this.Document._layout_columnWidth, this._props.PanelWidth() / 4)); return Math.min(availableWidth, this.isStackingView ? Number.MAX_VALUE : cwid - this.gridGap); } @@ -241,7 +241,7 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection this._disposers.width = reaction( () => [this._props.PanelWidth() - 2 * this.xMargin, NumCast(this.Document._layout_columnWidth, 250)], ([pw, cw]) => { - if (!this.isStackingView) { + if (!this.isStackingView && Math.round(pw / cw)) { this.layoutDoc._layout_columnCount = Math.round(pw / cw); } } @@ -607,7 +607,7 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection const rows = () => (!this.isStackingView ? 1 : Math.max(1, Math.min(docList.length, Math.floor((this._props.PanelWidth() - 2 * this.xMargin) / (this.columnWidth + this.gridGap))))); return ( <div key={(heading?.heading ?? '') + 'head'}> - {this._props.isContentActive() && !this.isStackingView ? this.columnDragger : null} + {this._props.isContentActive() && !this.isStackingView && !this.chromeHidden ? this.columnDragger : null} <div style={{ top: this.yMargin }}> <CollectionMasonryViewFieldRow showHandle={first} |