aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionTreeView.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-06-30 23:47:16 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-06-30 23:47:16 +0530
commitb9eb75e743ceaf8540a7a7d3b6f08b42e75de25c (patch)
treed5b6e0c34cf1deae5deaa508f4c8d49e53534294 /src/client/views/collections/CollectionTreeView.tsx
parent4590467260a783e7d83adb20631c3b575d7e4cd3 (diff)
parent5d7823da144191930ead98a60aedd6543748d4a1 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/collections/CollectionTreeView.tsx')
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index f6f6fb7cc..620b977fa 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -304,7 +304,7 @@ class TreeView extends React.Component<TreeViewProps> {
}
rtfWidth = () => Math.min(this.layoutDoc?.[WidthSym](), this.props.panelWidth() - 20);
- rtfHeight = () => this.rtfWidth() < this.layoutDoc?.[WidthSym]() ? Math.min(this.layoutDoc?.[HeightSym](), this.MAX_EMBED_HEIGHT) : this.MAX_EMBED_HEIGHT;
+ rtfHeight = () => this.rtfWidth() <= this.layoutDoc?.[WidthSym]() ? Math.min(this.layoutDoc?.[HeightSym](), this.MAX_EMBED_HEIGHT) : this.MAX_EMBED_HEIGHT;
@computed get renderContent() {
TraceMobx();
@@ -332,8 +332,8 @@ class TreeView extends React.Component<TreeViewProps> {
</div></ul>;
} else {
const layoutDoc = this.layoutDoc;
- const panelHeight = layoutDoc.type === DocumentType.RTF ? this.rtfHeight : this.docHeight;
- const panelWidth = layoutDoc.type === DocumentType.RTF ? this.rtfWidth : this.docWidth;
+ const panelHeight = StrCast(Doc.LayoutField(layoutDoc)).includes("FormattedTextBox") ? this.rtfHeight : this.docHeight;
+ const panelWidth = StrCast(Doc.LayoutField(layoutDoc)).includes("FormattedTextBox") ? this.rtfWidth : this.docWidth;
return <div ref={this._dref} style={{ display: "inline-block", height: panelHeight() }} key={this.doc[Id]}>
<ContentFittingDocumentView
Document={layoutDoc}
@@ -386,8 +386,8 @@ class TreeView extends React.Component<TreeViewProps> {
e.stopPropagation();
}
- @computed
- get renderBullet() {
+ @computed get renderBullet() {
+ TraceMobx();
const checked = this.doc.type === DocumentType.COL ? undefined : this.onCheckedClick ? (this.doc.treeViewChecked ?? "unchecked") : undefined;
return <div className="bullet"
title={this.childDocs?.length ? `click to see ${this.childDocs?.length} items` : "view fields"}