aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-05 19:26:31 -0500
committerbobzel <zzzman@gmail.com>2025-03-05 19:26:31 -0500
commitb38b2ee7826550ccd0960ef95016e81f1d930798 (patch)
tree6cda57eb4d25df3eee7c2003d40ebf3756a6bbe4 /src/client/views/collections/CollectionStackingView.tsx
parent466f1967af7583654de4d57fb89efe5b70630dbd (diff)
parent436b3def89ea955e2ff30fe8c2e9d15092e8c9a9 (diff)
Merge branch 'master' into Merge
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx6
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}