diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-04-08 01:01:43 -0400 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-04-08 01:01:43 -0400 |
| commit | 3d434ba49ed378cbbf0214d991ca448de0864a03 (patch) | |
| tree | 216701eb8128b1558e65f474feb3a0fec3047d86 /src/client/views/SidebarAnnos.tsx | |
| parent | 0bc38e1ca78a5a2ee21d99ef511f2f744d8c67bb (diff) | |
| parent | d0b37d7b5a8749cb6157d938ff576c7714c8ce0b (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into sharing_scenario
Diffstat (limited to 'src/client/views/SidebarAnnos.tsx')
| -rw-r--r-- | src/client/views/SidebarAnnos.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/SidebarAnnos.tsx b/src/client/views/SidebarAnnos.tsx index b5bdf4ca8..6c3eb1e95 100644 --- a/src/client/views/SidebarAnnos.tsx +++ b/src/client/views/SidebarAnnos.tsx @@ -16,6 +16,7 @@ import "./SidebarAnnos.scss"; import { StyleProp } from './StyleProvider'; import React = require("react"); import { DocumentViewProps } from './nodes/DocumentView'; +import { DocumentType } from '../documents/DocumentTypes'; interface ExtraProps { fieldKey: string; @@ -69,7 +70,7 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> { sidebarKey = () => this.props.fieldKey + "-sidebar"; filtersHeight = () => 50; screenToLocalTransform = () => this.props.ScreenToLocalTransform().translate(Doc.NativeWidth(this.props.dataDoc), 0).scale(this.props.scaling?.() || 1); - panelWidth = () => !this.props.layoutDoc._showSidebar ? 0 : (NumCast(this.props.layoutDoc.nativeWidth) - Doc.NativeWidth(this.props.dataDoc)) * this.props.PanelWidth() / NumCast(this.props.layoutDoc.nativeWidth); + panelWidth = () => !this.props.layoutDoc._showSidebar ? 0 : this.props.layoutDoc.type === DocumentType.RTF ? this.props.PanelWidth() : (NumCast(this.props.layoutDoc.nativeWidth) - Doc.NativeWidth(this.props.dataDoc)) * this.props.PanelWidth() / NumCast(this.props.layoutDoc.nativeWidth); panelHeight = () => this.props.PanelHeight() - this.filtersHeight(); addDocument = (doc: Doc | Doc[]) => this.props.sidebarAddDocument(doc, this.sidebarKey()); moveDocument = (doc: Doc | Doc[], targetCollection: Doc | undefined, addDocument: (doc: Doc | Doc[]) => boolean) => this.props.moveDocument(doc, targetCollection, addDocument, this.sidebarKey()); |
