aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/SidebarAnnos.tsx
diff options
context:
space:
mode:
authorAubrey-Li <63608597+Aubrey-Li@users.noreply.github.com>2021-07-26 12:52:28 -0700
committerAubrey-Li <63608597+Aubrey-Li@users.noreply.github.com>2021-07-26 12:52:28 -0700
commit65dbf20695e4901813ac4cba6375a5bc15498fd8 (patch)
tree93e4051c4ab6228d73d4c1ccf3b8e384fd6b68fa /src/client/views/SidebarAnnos.tsx
parent2e87ebdef8061ca181864037f1378c46846243f1 (diff)
parent26e9e0a554ee5aff001e2bc10b6802a4e830b63c (diff)
Merge branch 'master' into trails-aubrey
Diffstat (limited to 'src/client/views/SidebarAnnos.tsx')
-rw-r--r--src/client/views/SidebarAnnos.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/SidebarAnnos.tsx b/src/client/views/SidebarAnnos.tsx
index 59ff1c340..9c5a54574 100644
--- a/src/client/views/SidebarAnnos.tsx
+++ b/src/client/views/SidebarAnnos.tsx
@@ -78,7 +78,9 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> {
docFilters = () => [...StrListCast(this.props.layoutDoc._docFilters), ...StrListCast(this.props.layoutDoc[this.filtersKey])];
sidebarStyleProvider = (doc: Opt<Doc>, props: Opt<FieldViewProps | DocumentViewProps>, property: string) => {
- if (property === StyleProp.ShowTitle) return StrCast(this.props.layoutDoc["sidebar-childShowTitle"], "title");
+ if (property === StyleProp.ShowTitle) {
+ return doc === this.props.rootDoc ? 0 : StrCast(this.props.layoutDoc["sidebar-childShowTitle"], "title");
+ }
return this.props.styleProvider?.(doc, props, property);
}
render() {
@@ -117,6 +119,7 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> {
styleProvider={this.sidebarStyleProvider}
docFilters={this.docFilters}
scaleField={this.sidebarKey() + "-scale"}
+ setHeight={(height) => this.props.setHeight(height + this.filtersHeight())}
isAnnotationOverlay={false}
select={emptyFunction}
scaling={returnOne}