aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-10-18 14:00:25 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-10-18 14:00:25 -0400
commit11537da75c76fba79a2709d2ad175dfa16a25256 (patch)
tree1250a20ff25bbc43e880a4e52230d5396c5c5086 /src/client/views/nodes/DocumentView.tsx
parente21810a4097e724a378416135c7cc6def7ff022c (diff)
fixes for drawing link anchors to pdf text selections.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 48ad7a632..8bf698391 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -629,6 +629,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
DataDoc={this.props.DataDoc} />);
}
linkEndpoint = (linkDoc: Doc) => Doc.AreProtosEqual(this.props.Document, Cast(linkDoc.anchor1, Doc) as Doc) ? "layoutKey1" : "layoutKey2";
+ linkEndpointDoc = (linkDoc: Doc) => Doc.AreProtosEqual(this.props.Document, Cast(linkDoc.anchor1, Doc) as Doc) ? Cast(linkDoc.anchor1, Doc) as Doc : Cast(linkDoc.anchor2, Doc) as Doc;
render() {
if (!this.props.Document) return (null);
@@ -701,6 +702,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
onPointerEnter={() => Doc.BrushDoc(this.props.Document)} onPointerLeave={() => Doc.UnBrushDoc(this.props.Document)}
>
{this.props.Document.links && DocListCast(this.props.Document.links).map((d, i) =>
+ //this.linkEndpointDoc(d).type === DocumentType.PDFANNO ? (null) :
<div style={{ pointerEvents: "none", position: "absolute", transformOrigin: "top left", width: "100%", height: "100%", transform: `scale(${this.props.Document.fitWidth ? 1 : 1 / this.props.ContentScaling()})` }}>
<DocumentView {...this.props} backgroundColor={returnTransparent} Document={d} layoutKey={this.linkEndpoint(d)} />
</div>)}