diff options
author | bobzel <zzzman@gmail.com> | 2022-11-30 12:58:47 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-11-30 12:58:47 -0500 |
commit | ae8e487fbf7a5e662a04c14e805041bbdf49c87d (patch) | |
tree | fa37983ac454fbf74f54256b9238ac41994eaab1 /src | |
parent | f61092c162378f8884335b0988058420b7982f7d (diff) |
show link count for isLinkButton docs, don't show link links for sidebaranno links by default.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/SidebarAnnos.tsx | 3 | ||||
-rw-r--r-- | src/client/views/StyleProvider.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 5 |
3 files changed, 5 insertions, 5 deletions
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<FieldViewProps & ExtraProps> { }); 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<Doc>, props: Opt<DocumentViewProps case StyleProp.Opacity: return Cast(doc?._opacity, 'number', Cast(doc?.opacity, 'number', null)); case StyleProp.HideLinkButton: - return props?.hideLinkButton || (!selected && (doc?.isLinkButton || doc?.hideLinkButton)); + return props?.hideLinkButton || (!selected && doc?.hideLinkButton); case StyleProp.FontSize: return StrCast(doc?.[fieldKey + 'fontSize'], StrCast(doc?._fontSize, StrCast(Doc.UserDoc().fontSize))); case StyleProp.FontFamily: diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index a8bea61c9..48e32c071 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -1535,9 +1535,8 @@ export class DocumentView extends React.Component<DocumentViewProps> { 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 : ( - <DocumentLinksButton View={this} scaling={this.linkButtonInverseScaling} OnHover={true} Bottom={this.topMost} ShowCount={true} /> - ); + const hideCount = this.props.renderDepth === -1 || SnappingManager.GetIsDragging() || (this.isSelected() && this.props.renderDepth) || !this._isHovering || this.hideLinkButton; + return hideCount ? null : <DocumentLinksButton View={this} scaling={this.linkButtonInverseScaling} OnHover={true} Bottom={this.topMost} ShowCount={true} />; } @computed get docViewPath(): DocumentView[] { |