diff options
| author | bobzel <zzzman@gmail.com> | 2023-05-14 12:03:40 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-05-14 12:03:40 -0400 |
| commit | 42afc0250de658fc3e924864bfae5afb4edec335 (patch) | |
| tree | d61bbc43d95cb6e1d6fa5c997102d505adc09af5 /src/client/views/SidebarAnnos.tsx | |
| parent | 0849fbd97c61688d51e5fea6cf8edc47989df5de (diff) | |
major overhaul of field naming conventions.
Diffstat (limited to 'src/client/views/SidebarAnnos.tsx')
| -rw-r--r-- | src/client/views/SidebarAnnos.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/views/SidebarAnnos.tsx b/src/client/views/SidebarAnnos.tsx index b0aab968e..741e87644 100644 --- a/src/client/views/SidebarAnnos.tsx +++ b/src/client/views/SidebarAnnos.tsx @@ -67,15 +67,15 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> { annotationOn: this.props.rootDoc, _width: 200, _height: 50, - _fitWidth: true, - _autoHeight: true, + _layout_fitWidth: true, + _layout_autoHeight: true, _fontSize: StrCast(Doc.UserDoc().fontSize), _fontFamily: StrCast(Doc.UserDoc().fontFamily), }); FormattedTextBox.SelectOnLoad = target[Id]; FormattedTextBox.DontSelectInitialText = true; - const link = DocUtils.MakeLink(anchor, target, { linkRelationship: 'inline comment:comment on' }); - link && (link.linkDisplay = false); + const link = DocUtils.MakeLink(anchor, target, { link_relationship: 'inline comment:comment on' }); + link && (link.layout_linkDisplay = false); const taggedContent = this.docFilters() .filter(data => data.split(':')[0]) @@ -151,7 +151,7 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> { }; get sidebarKey() { - return this.props.fieldKey + '-sidebar'; + return this.props.fieldKey + '_sidebar'; } filtersHeight = () => 38; screenToLocalTransform = () => @@ -170,11 +170,11 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> { moveDocument = (doc: Doc | Doc[], targetCollection: Doc | undefined, addDocument: (doc: Doc | Doc[]) => boolean) => this.props.moveDocument(doc, targetCollection, addDocument, this.sidebarKey); removeDocument = (doc: Doc | Doc[]) => this.props.removeDocument(doc, this.sidebarKey); docFilters = () => [...StrListCast(this.props.layoutDoc._docFilters), ...StrListCast(this.props.layoutDoc[this.filtersKey])]; - showTitle = () => 'title'; + layout_showTitle = () => 'title'; setHeightCallback = (height: number) => this.props.setHeight?.(height + this.filtersHeight()); sortByLinkAnchorY = (a: Doc, b: Doc) => { - const ay = LinkManager.Links(a).length && DocCast(LinkManager.Links(a)[0].anchor1).y; - const by = LinkManager.Links(b).length && DocCast(LinkManager.Links(b)[0].anchor1).y; + const ay = LinkManager.Links(a).length && DocCast(LinkManager.Links(a)[0].link_anchor_1).y; + const by = LinkManager.Links(b).length && DocCast(LinkManager.Links(b)[0].link_anchor_1).y; return NumCast(ay) - NumCast(by); }; render() { @@ -208,7 +208,7 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> { style={{ position: 'absolute', pointerEvents: this.props.isContentActive() ? 'all' : undefined, - top: this.props.rootDoc.type !== DocumentType.RTF && StrCast(this.props.rootDoc._showTitle) === 'title' ? 15 : 0, + top: this.props.rootDoc.type !== DocumentType.RTF && StrCast(this.props.rootDoc._layout_showTitle) === 'title' ? 15 : 0, right: 0, background: this.props.styleProvider?.(this.props.rootDoc, this.props, StyleProp.WidgetColor), width: `100%`, @@ -235,7 +235,7 @@ export class SidebarAnnos extends React.Component<FieldViewProps & ExtraProps> { isAnnotationOverlay={false} select={emptyFunction} NativeDimScaling={returnOne} - //childShowTitle={this.showTitle} + //childlayout_showTitle={this.layout_showTitle} isAnyChildContentActive={returnFalse} childDocumentsActive={this.props.isContentActive} whenChildContentsActiveChanged={this.props.whenChildContentsActiveChanged} |
