diff options
author | bobzel <zzzman@gmail.com> | 2022-04-28 10:49:32 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-04-28 10:49:32 -0400 |
commit | 778432158e5f0bcdcb2e68ff6872a5c9335ef3af (patch) | |
tree | 7100f265448c313e63404e5f8b2f45d9bad147ff /src/client/views/nodes/DocumentLinksButton.tsx | |
parent | 36261eac67ae6f872c9be2c9766d21ac24698f8e (diff) |
made sharing menu a developer feature. made link relationships support non-symmetry
Diffstat (limited to 'src/client/views/nodes/DocumentLinksButton.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentLinksButton.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentLinksButton.tsx b/src/client/views/nodes/DocumentLinksButton.tsx index 9b79db319..d2e6e8579 100644 --- a/src/client/views/nodes/DocumentLinksButton.tsx +++ b/src/client/views/nodes/DocumentLinksButton.tsx @@ -17,6 +17,7 @@ import { DocumentView } from "./DocumentView"; import { LinkDescriptionPopup } from "./LinkDescriptionPopup"; import { TaskCompletionBox } from "./TaskCompletedBox"; import React = require("react"); +import { DocumentType } from "../../documents/DocumentTypes"; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; @@ -158,7 +159,9 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp } else if (startLink !== endLink) { endLink = endLinkView?.docView?._componentView?.getAnchor?.() || endLink; startLink = DocumentLinksButton.StartLinkView?.docView?._componentView?.getAnchor?.() || startLink; - const linkDoc = DocUtils.MakeLink({ doc: startLink }, { doc: endLink }, DocumentLinksButton.AnnotationId ? "hypothes.is annotation" : "link", undefined, undefined, true); + const linkDoc = DocUtils.MakeLink({ doc: startLink }, { doc: endLink }, + DocumentLinksButton.AnnotationId ? "hypothes.is annotation" : + endLink.type === DocumentType.RTF ? "Commentary:Comments On" : "link", undefined, undefined, true); LinkManager.currentLink = linkDoc; @@ -272,7 +275,11 @@ export class DocumentLinksButton extends React.Component<DocumentLinksButtonProp //render circular tooltip if it isn't set to invisible and show the number of doc links the node has, and render inner-menu link button for starting/stopping links if currently in menu return (!Array.from(this.filteredLinks).length && !this.props.AlwaysOn) ? (null) : - <div className="documentLinksButton-wrapper" style={{ transform: this.props.InMenu ? undefined : `scale(${(this.props.ContentScaling?.() || 1) * this.props.View.screenToLocalTransform().Scale})` }} > + <div className="documentLinksButton-wrapper" + style={{ + transform: this.props.InMenu ? undefined : + `scale(${(this.props.ContentScaling?.() || 1) * this.props.View.screenToLocalTransform().Scale})` + }} > { (this.props.InMenu && (DocumentLinksButton.StartLink || this.props.StartLink)) || (!DocumentLinksButton.LinkEditorDocView && !this.props.InMenu) ? |