aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ComparisonBox.tsx
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2021-10-06 20:02:26 -0400
committergeireann <geireann.lindfield@gmail.com>2021-10-06 20:02:26 -0400
commit37528f87e89e2072080fac7eefe022d8989faabc (patch)
treec35e7d35011eb8472e54e5e3ca72e80cdf528a5b /src/client/views/nodes/ComparisonBox.tsx
parent8691e25e2f65e5041e147d37374c77947298a4b5 (diff)
parent98d1eb76be11949257417da5efdd9ab0c5b776c9 (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web
Diffstat (limited to 'src/client/views/nodes/ComparisonBox.tsx')
-rw-r--r--src/client/views/nodes/ComparisonBox.tsx12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx
index f23c68409..b1aada158 100644
--- a/src/client/views/nodes/ComparisonBox.tsx
+++ b/src/client/views/nodes/ComparisonBox.tsx
@@ -89,14 +89,20 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatabl
};
const displayDoc = (which: string) => {
var whichDoc = Cast(this.dataDoc[which], Doc, null);
- if (whichDoc?.type === DocumentType.MARKER) whichDoc = Cast(whichDoc.annotationOn, Doc, null);
+ //if (whichDoc?.type === DocumentType.MARKER)
+ const targetDoc = Cast(whichDoc.annotationOn, Doc, null) ?? whichDoc;
return whichDoc ? <>
- <DocumentView {...OmitKeys(this.props, ["NativeWidth", "NativeHeight"]).omit}
+ <DocumentView
+ ref={(r) => {
+ whichDoc !== targetDoc && r?.focus(targetDoc);
+ }}
+ {...OmitKeys(this.props, ["NativeWidth", "NativeHeight"]).omit}
isContentActive={returnFalse}
isDocumentActive={returnFalse}
styleProvider={this.docStyleProvider}
- Document={whichDoc}
+ Document={targetDoc}
DataDoc={undefined}
+ hideLinkButton={true}
pointerEvents={"none"} />
{clearButton(which)}
</> : // placeholder image if doc is missing