diff options
| author | mehekj <mehek.jethani@gmail.com> | 2023-04-10 16:08:58 -0400 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2023-04-10 16:08:58 -0400 |
| commit | bff54ce7283f7a50a8c4184ea0543b7a2d338e25 (patch) | |
| tree | 26af049cb8549aa75cc376524e123b78adf5a94f /src/client/views/collections/collectionLinear | |
| parent | 7934c38ed641f4a10cd008fe415a50aef1240e10 (diff) | |
| parent | 3cb7f85b23eb0ae3a432bbe15b8a2cda37290ce2 (diff) | |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/collections/collectionLinear')
| -rw-r--r-- | src/client/views/collections/collectionLinear/CollectionLinearView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx index a062c65fc..c7d9b6619 100644 --- a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx +++ b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx @@ -44,7 +44,7 @@ export class CollectionLinearView extends CollectionSubView() { componentDidMount() { this._widthDisposer = reaction( - () => 5 + this.dimension() + (this.layoutDoc.linearViewIsExpanded ? this.childDocs.filter(doc => !doc.hidden).reduce((tot, doc) => (doc[WidthSym]() || this.dimension()) + tot + 4, 0) : 0), + () => 5 + NumCast(this.rootDoc.linearBtnWidth, this.dimension()) + (this.layoutDoc.linearViewIsExpanded ? this.childDocs.filter(doc => !doc.hidden).reduce((tot, doc) => (doc[WidthSym]() || this.dimension()) + tot + 4, 0) : 0), width => this.childDocs.length && (this.layoutDoc._width = width), { fireImmediately: true } ); @@ -78,7 +78,7 @@ export class CollectionLinearView extends CollectionSubView() { } }; - dimension = () => NumCast(this.rootDoc._height); // 2 * the padding + dimension = () => NumCast(this.rootDoc._height); getTransform = (ele: Opt<HTMLDivElement>) => { if (!ele) return Transform.Identity(); const { scale, translateX, translateY } = Utils.GetScreenTransform(ele); |
