aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-02-27 14:46:20 -0500
committerbobzel <zzzman@gmail.com>2025-02-27 14:46:20 -0500
commitbcf3b005d55ec851374049f4c188d96ffc7a7c8b (patch)
tree8f65a6350a71ecc222c859155a38d2debf0e519f /src/client/views/collections/CollectionStackingView.tsx
parent5505010e14bede33a692a656515bd6ca106103f2 (diff)
prevent tagsview from appeqring in spreadsheet. set default fill color only if nothing is selected. place column divider at top of stacking/card views. move card view flashcard view to top left independent of margin settings.
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index 0a25882ff..e8fa8b01e 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -452,7 +452,7 @@ export class CollectionStackingView extends CollectionSubView<Partial<collection
};
@action
onDividerMove = (e: PointerEvent) => {
- this.Document._layout_columnWidth = Math.max(10, this.ScreenToLocalBoxXf().transformPoint(e.clientX, 0)[0] - this.xMargin);
+ this.Document._layout_columnWidth = Math.max(10, (this._props.DocumentView?.().screenToViewTransform().transformPoint(e.clientX, 0)[0] ?? 0) - this.xMargin);
return false;
};
@@ -606,26 +606,29 @@ 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 style={{ top: this.yMargin }}>
- <CollectionMasonryViewFieldRow
- showHandle={first}
- Document={this.Document}
- chromeHidden={this.chromeHidden}
- pivotField={this.pivotField}
- refList={this._refList}
- key={heading ? heading.heading : ''}
- rows={rows}
- headings={this.headings}
- heading={heading ? heading.heading : ''}
- headingObject={heading}
- docList={docList}
- parent={this}
- type={type}
- createDropTarget={this.createDashEventsTarget}
- screenToLocalTransform={this.ScreenToLocalBoxXf}
- setDocHeight={this.setDocHeight}
- />
- </div>
+ <>
+ {this._props.isContentActive() && !this.isStackingView ? this.columnDragger : null}
+ <div style={{ top: this.yMargin }}>
+ <CollectionMasonryViewFieldRow
+ showHandle={first}
+ Document={this.Document}
+ chromeHidden={this.chromeHidden}
+ pivotField={this.pivotField}
+ refList={this._refList}
+ key={heading ? heading.heading : ''}
+ rows={rows}
+ headings={this.headings}
+ heading={heading ? heading.heading : ''}
+ headingObject={heading}
+ docList={docList}
+ parent={this}
+ type={type}
+ createDropTarget={this.createDashEventsTarget}
+ screenToLocalTransform={this.ScreenToLocalBoxXf}
+ setDocHeight={this.setDocHeight}
+ />
+ </div>
+ </>
);
};