diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-06-15 12:47:31 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-06-15 12:47:31 -0400 |
commit | 40579c8b3cf0504ac10e966e640af58e8876acd3 (patch) | |
tree | cc280d53b66d244eae6bd1e5c5d00a0d6b1dc3ea /src/client/views/nodes/DocumentView.tsx | |
parent | e31f6403bc62faea72767f68d3bf34ac8bd28183 (diff) | |
parent | d92775bffab6470dc6142e02092b7cae2c30b5ff (diff) |
Merge branch 'collaboration-sarah' of https://github.com/brown-dash/Dash-Web into collaboration-sarah
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 884a6e75c..8421ce106 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -1089,6 +1089,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps SharingManager.Instance.users.find(users => users.user.email === this.dataDoc.author)?.sharingDoc.userColor, Doc.UserDoc().layout_showTitle && [DocumentType.RTF, DocumentType.COL].includes(this.rootDoc.type as any) ? StrCast(Doc.SharingDoc().userColor) : 'rgba(0,0,0,0.4)' ); + const sidebarWidthPercent = +StrCast(this.layoutDoc.layout_sidebarWidthPercent).replace('%', ''); const titleView = !showTitle ? null : ( <div className={`documentView-titleWrapper${showTitleHover ? '-hover' : ''}`} @@ -1096,7 +1097,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps style={{ position: this.headerMargin ? 'relative' : 'absolute', height: this.titleHeight, - width: !this.headerMargin ? `calc(100% - 18px)` : '100%', // leave room for annotation button + width: !this.headerMargin ? `calc(${sidebarWidthPercent || 100}% - 18px)` : (sidebarWidthPercent || 100) + '%', // leave room for annotation button color: lightOrDark(background), background, pointerEvents: (!this.disableClickScriptFunc && this.onClickHandler) || this.Document.ignoreClick ? 'none' : this.isContentActive() || this.props.isDocumentActive?.() ? 'all' : undefined, |