From b4f79e48d5d30312367e268c2c505f65c5cacdb4 Mon Sep 17 00:00:00 2001 From: monikahedman Date: Tue, 27 Aug 2019 13:19:20 -0400 Subject: things are progressing --- src/client/views/linking/LinkFollowBox.scss | 1 + src/client/views/linking/LinkFollowBox.tsx | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/client/views/linking') diff --git a/src/client/views/linking/LinkFollowBox.scss b/src/client/views/linking/LinkFollowBox.scss index 7fad9ae93..a34285727 100644 --- a/src/client/views/linking/LinkFollowBox.scss +++ b/src/client/views/linking/LinkFollowBox.scss @@ -8,6 +8,7 @@ box-shadow: $intermediate-color 0.2vw 0.2vw 0.4vw; border: solid #BBBBBBBB 5px; pointer-events: all; + // transform-origin: top right; // overflow: hidden; .linkFollowBox-header { diff --git a/src/client/views/linking/LinkFollowBox.tsx b/src/client/views/linking/LinkFollowBox.tsx index 213022bc8..cf44ae649 100644 --- a/src/client/views/linking/LinkFollowBox.tsx +++ b/src/client/views/linking/LinkFollowBox.tsx @@ -16,6 +16,7 @@ import { Id } from "../../../new_fields/FieldSymbols"; import { listSpec } from "../../../new_fields/Schema"; import { DocServer } from "../../DocServer"; import { RefField } from "../../../new_fields/RefField"; +import { Docs } from "../../documents/Documents"; enum FollowModes { OPENTAB = "Open in Tab", @@ -59,6 +60,11 @@ export class LinkFollowBox extends React.Component { this.collectionTypes = ["Invalid", "Freeform", "Schema", "Docking", "Tree", "Stacking", "Masonry"]; } + @computed + get getDoc() { + return this.props.Document; + } + componentDidMount = () => { this.resetVars(); @@ -322,6 +328,10 @@ export class LinkFollowBox extends React.Component { currentLinkBehavior = () => { // this.resetPan(); if (LinkFollowBox.destinationDoc) { + if (this.selectedContextString === "") { + this.selectedContextString = "self"; + this.selectedContext = LinkFollowBox.destinationDoc; + } if (this.selectedOption === "") this.selectedOption = FollowOptions.NOZOOM; let shouldZoom: boolean = this.selectedOption === FollowOptions.NOZOOM ? false : true; let notOpenInContext: boolean = this.selectedContextString === "self" || this.selectedContextString === LinkFollowBox.destinationDoc[Id]; @@ -476,7 +486,7 @@ export class LinkFollowBox extends React.Component { type="radio" disabled={LinkFollowBox.linkDoc ? false : true} name="context" value={LinkFollowBox.destinationDoc ? StrCast(LinkFollowBox.destinationDoc[Id]) : "self"} - checked={LinkFollowBox.destinationDoc ? this.selectedContextString === StrCast(LinkFollowBox.destinationDoc[Id]) : this.selectedContextString === "self"} + checked={LinkFollowBox.destinationDoc ? this.selectedContextString === StrCast(LinkFollowBox.destinationDoc[Id]) || this.selectedContextString === "self" : true} onChange={this.handleContextChange} /> Open Self
-- cgit v1.2.3-70-g09d2