diff options
author | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-09-15 16:41:54 -0400 |
---|---|---|
committer | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-09-15 16:41:54 -0400 |
commit | 3f38401ee477bd37ad95e5170783ca406437e195 (patch) | |
tree | 13971b66a6c3267fbb268c40694b1e2799f80e4b /src | |
parent | b4520766b3032ba8b3886197fa46de0cdb1cea50 (diff) |
cleaning code
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/linking/LinkFollowBox.tsx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/client/views/linking/LinkFollowBox.tsx b/src/client/views/linking/LinkFollowBox.tsx index 6e20cf8c1..66661d178 100644 --- a/src/client/views/linking/LinkFollowBox.tsx +++ b/src/client/views/linking/LinkFollowBox.tsx @@ -257,20 +257,13 @@ export class LinkFollowBox extends React.Component<FieldViewProps> { DocumentManager.Instance.jumpToDocument(jumpToDoc, shouldZoom, false, document => dockingFunc(sourceContext!)); if (LinkFollowBox.sourceDoc && LinkFollowBox.destinationDoc) { if (guid) { - // console.log("guid"); - // console.log('source and dest ids respectively are', StrCast(LinkFollowBox.sourceDoc[Id]), StrCast(LinkFollowBox.destinationDoc[Id])); // need to find if jumptodoc is the doc to follow, take id - jumpToDoc.linkHref = Utils.prepend("/doc/" + StrCast(LinkFollowBox.sourceDoc[Id])); LinkFollowBox.destinationDoc.guid = guid; - // process to follow: if guid, then we want to find the linkhref and use that to figure out whether we can find the links that correspond to the guid. } else { - console.log("no guid"); // retroactively fixing old in-text links by adding guid - // console.log('source and dest ids respectively are', StrCast(LinkFollowBox.sourceDoc[Id]), StrCast(LinkFollowBox.destinationDoc[Id]), 'as well as the linkdoc id', LinkFollowBox.linkDoc[Id]); jumpToDoc.linkHref = Utils.prepend("/doc/" + StrCast(LinkFollowBox.sourceDoc[Id])); + // jumpToDoc.linkHref = Utils.prepend("/doc/" + StrCast(LinkFollowBox.linkDoc[Id])); let newguid = Utils.GenerateGuid(); LinkFollowBox.linkDoc.guid = newguid; - jumpToDoc.linkHref = Utils.prepend("/doc/" + StrCast(LinkFollowBox.linkDoc[Id])); LinkFollowBox.destinationDoc.guid = newguid; - // if we find a link that doesnt match a guid but matches the OG link ref that correspond to the original anchor, then we move forward } } } |