aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/linking
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/linking')
-rw-r--r--src/client/views/linking/LinkFollowBox.scss1
-rw-r--r--src/client/views/linking/LinkFollowBox.tsx12
2 files changed, 12 insertions, 1 deletions
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<FieldViewProps> {
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<FieldViewProps> {
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<FieldViewProps> {
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
</label><br />