diff options
| author | Andy Rickert <andrew_rickert@brown.edu> | 2020-04-29 16:23:30 -0700 | 
|---|---|---|
| committer | Andy Rickert <andrew_rickert@brown.edu> | 2020-04-29 16:23:30 -0700 | 
| commit | ddf0902be470f6557695627fc65103c2d10e42f7 (patch) | |
| tree | 38311ac28f3f253462b9f867220fdee732f7a336 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 9aab1f5e7dc7438dfa8a93afe03bd5746315c994 (diff) | |
| parent | dadbb74ffa56a0dc55745ce972e7b13925629b7b (diff) | |
merge w master
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index dd84c4d6e..e3720bf01 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -49,7 +49,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {      @computed get columnWidth() {          TraceMobx();          return Math.min(this.props.PanelWidth() / (this.props as any).ContentScaling() - 2 * this.xMargin, -            this.isStackingView ? Number.MAX_VALUE : NumCast(this.props.Document.columnWidth, 250)); +            this.isStackingView ? Number.MAX_VALUE : this.props.Document.columnWidth === -1 ? this.props.PanelWidth() - 2 * this.xMargin : NumCast(this.props.Document.columnWidth, 250));      }      @computed get NodeWidth() { return this.props.PanelWidth() - this.gridGap; } @@ -63,7 +63,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {              const dxf = () => this.getDocTransform(d, dref.current!);              this._docXfs.push({ dxf: dxf, width: width, height: height });              const rowSpan = Math.ceil((height() + this.gridGap) / this.gridGap); -            const style = this.isStackingView ? { width: width(), marginTop: this.gridGap, height: height() } : { gridRowEnd: `span ${rowSpan}` }; +            const style = this.isStackingView ? { width: width(), marginTop: i ? this.gridGap : 0, height: height() } : { gridRowEnd: `span ${rowSpan}` };              return <div className={`collectionStackingView-${this.isStackingView ? "columnDoc" : "masonryDoc"}`} key={d[Id]} ref={dref} style={style} >                  {this.getDisplayDoc(d, (!d.isTemplateDoc && !d.isTemplateForField && !d.PARAMS) ? undefined : this.props.DataDoc, dxf, width)}              </div>; @@ -189,8 +189,8 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {              active={this.props.active}              whenActiveChanged={this.props.whenActiveChanged}              addDocTab={this.addDocTab} -            pinToPres={this.props.pinToPres}> -        </ContentFittingDocumentView>; +            pinToPres={this.props.pinToPres} +        />;      }      getDocWidth(d?: Doc) { @@ -303,7 +303,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {                      const doc = this.props.DataDoc && this.props.DataDoc.layout === this.layoutDoc ? this.props.DataDoc : this.layoutDoc;                      this.observer = new _global.ResizeObserver(action((entries: any) => {                          if (this.props.Document._autoHeight && ref && this.refList.length && !SelectionManager.GetIsDragging()) { -                            Doc.Layout(doc)._height = Math.max(...this.refList.map(r => Number(getComputedStyle(r).height.replace("px", "")))); +                            Doc.Layout(doc)._height = Math.min(1200, Math.max(...this.refList.map(r => Number(getComputedStyle(r).height.replace("px", "")))));                          }                      }));                      this.observer.observe(ref); @@ -397,7 +397,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {          if (!e.isPropagationStopped()) {              const subItems: ContextMenuProps[] = [];              subItems.push({ description: `${this.props.Document.fillColumn ? "Variable Size" : "Autosize"} Column`, event: () => this.props.Document.fillColumn = !this.props.Document.fillColumn, icon: "plus" }); -            ContextMenu.Instance.addItem({ description: "Stacking Options ...", subitems: subItems, icon: "eye" }); +            ContextMenu.Instance.addItem({ description: "Options...", subitems: subItems, icon: "eye" });          }      } | 
