diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-14 00:09:37 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-14 00:09:37 -0500 |
| commit | c5ea9a228d97974250194cbe41e0f356c3c3906f (patch) | |
| tree | 5d504857d533092e27ec196c795bb3506a524d38 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 7a25dcc004de773fbdee229f79338b81001d3077 (diff) | |
added sidebar annotations to webBox. Fixed PdfBox to allow marqueeing when sidebar annotation is selected.
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index e69dbf3ac..f3c1c4464 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -37,6 +37,7 @@ const StackingDocument = makeInterface(collectionSchema, documentSchema); export type collectionStackingViewProps = { chromeStatus?: string; + viewType?: CollectionViewType; NativeWidth?: () => number; NativeHeight?: () => number; }; @@ -60,7 +61,7 @@ export class CollectionStackingView extends CollectionSubView<StackingDocument, @computed get xMargin() { return NumCast(this.layoutDoc._xMargin, 2 * Math.min(this.gridGap, .05 * this.props.PanelWidth())); } @computed get yMargin() { return this.props.yMargin || NumCast(this.layoutDoc._yMargin, 5); } // 2 * this.gridGap)); } @computed get gridGap() { return NumCast(this.layoutDoc._gridGap, 10); } - @computed get isStackingView() { return this.layoutDoc._viewType === CollectionViewType.Stacking; } + @computed get isStackingView() { return (this.props.viewType ?? this.layoutDoc._viewType) === CollectionViewType.Stacking; } @computed get numGroupColumns() { return this.isStackingView ? Math.max(1, this.Sections.size + (this.showAddAGroup ? 1 : 0)) : 1; } @computed get showAddAGroup() { return (this.pivotField && (this.chromeStatus !== 'view-mode' && this.chromeStatus !== 'disabled')); } @computed get columnWidth() { @@ -315,7 +316,7 @@ export class CollectionStackingView extends CollectionSubView<StackingDocument, const pos1 = cd.stackedDocTransform().inverse().transformPoint(cd.width(), cd.height()); if (where[0] > pos[0] && where[0] < pos1[0] && where[1] > pos[1] && (i === this._docXfs.length - 1 || where[1] < pos1[1])) { dropInd = i; - const axis = this.Document._viewType === CollectionViewType.Masonry ? 0 : 1; + const axis = this.isStackingView ? 1 : 0; dropAfter = where[axis] > (pos[axis] + pos1[axis]) / 2 ? 1 : 0; } }); |
