From ae8e487fbf7a5e662a04c14e805041bbdf49c87d Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 30 Nov 2022 12:58:47 -0500 Subject: show link count for isLinkButton docs, don't show link links for sidebaranno links by default. --- src/client/views/SidebarAnnos.tsx | 3 ++- src/client/views/StyleProvider.tsx | 2 +- src/client/views/nodes/DocumentView.tsx | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/SidebarAnnos.tsx b/src/client/views/SidebarAnnos.tsx index ec68a6b36..6d06bbbf6 100644 --- a/src/client/views/SidebarAnnos.tsx +++ b/src/client/views/SidebarAnnos.tsx @@ -72,7 +72,8 @@ export class SidebarAnnos extends React.Component { }); FormattedTextBox.SelectOnLoad = target[Id]; FormattedTextBox.DontSelectInitialText = true; - DocUtils.MakeLink({ doc: anchor }, { doc: target }, 'inline comment:comment on'); + const link = DocUtils.MakeLink({ doc: anchor }, { doc: target }, 'inline comment:comment on'); + link && (link.linkDisplay = false); const taggedContent = this.docFilters() .filter(data => data.split(':')[0]) diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index 8ee5ebdb6..dc7a4e047 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -129,7 +129,7 @@ export function DefaultStyleProvider(doc: Opt, props: Opt { linkButtonInverseScaling = () => (this.props.NativeDimScaling?.() || 1) * this.screenToLocalTransform().Scale; @computed get linkCountView() { - return this.props.renderDepth === -1 || SnappingManager.GetIsDragging() || (this.isSelected() && this.props.renderDepth) || !this._isHovering || this.hideLinkButton ? null : ( - - ); + const hideCount = this.props.renderDepth === -1 || SnappingManager.GetIsDragging() || (this.isSelected() && this.props.renderDepth) || !this._isHovering || this.hideLinkButton; + return hideCount ? null : ; } @computed get docViewPath(): DocumentView[] { -- cgit v1.2.3-70-g09d2