diff options
| author | bobzel <zzzman@gmail.com> | 2023-04-05 17:21:26 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-04-05 17:21:26 -0400 |
| commit | 8f7e99641f84ad15f34ba9e4a60b664ac93d2e5d (patch) | |
| tree | f7fe4f7a924899474be110c494d33f16d0b70edf /src/client/views/collections/collectionLinear | |
| parent | 38eb3a1b3f005b79a222f76b730e883b7e2b5253 (diff) | |
added an arrange feature for freeform collections. added btn width for linear buttons.
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); |
