aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-04 11:07:40 -0500
committerbobzel <zzzman@gmail.com>2025-03-04 11:07:40 -0500
commit93d4c71fe523a4b1f473ee6ab5e8a9b8ca715625 (patch)
treec191e1a81a1852ceadc83b4cfa173fa6d911e871 /src
parent215ad40efa2e343e290d18bffbc55884829f1a0d (diff)
fixed column width default / columnDragger for masonry view.
Diffstat (limited to 'src')
-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}