diff options
author | bobzel <zzzman@gmail.com> | 2020-07-07 10:01:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 10:01:33 -0400 |
commit | 06ef30846b8014d6701caa86b264612ceabc27d1 (patch) | |
tree | 69e1699c41688ffa984c3acc267f5ef2e77d62e2 /src/client/views/collections/CollectionLinearView.tsx | |
parent | 0438137cd435c47ce334b15a4ad00cbd70d80662 (diff) | |
parent | 915f35e6d6c0b0f7bdb18c0c2a6aa88ee5df5eed (diff) |
Merge pull request #433 from browngraphicslab/anika_linking
Pull Request for Andy
Diffstat (limited to 'src/client/views/collections/CollectionLinearView.tsx')
-rw-r--r-- | src/client/views/collections/CollectionLinearView.tsx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionLinearView.tsx b/src/client/views/collections/CollectionLinearView.tsx index 7cbe5c19d..c370415be 100644 --- a/src/client/views/collections/CollectionLinearView.tsx +++ b/src/client/views/collections/CollectionLinearView.tsx @@ -15,6 +15,7 @@ import { documentSchema } from '../../../fields/documentSchemas'; import { Id } from '../../../fields/FieldSymbols'; import { DocumentLinksButton } from '../nodes/DocumentLinksButton'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { LinkDescriptionPopup } from '../nodes/LinkDescriptionPopup'; type LinearDocument = makeInterface<[typeof documentSchema,]>; @@ -89,6 +90,21 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { DocumentLinksButton.StartLink = undefined; } + @action + changeDescriptionSetting = () => { + if (LinkDescriptionPopup.showDescriptions) { + if (LinkDescriptionPopup.showDescriptions === "ON") { + LinkDescriptionPopup.showDescriptions = "OFF"; + LinkDescriptionPopup.descriptionPopup = false; + } else { + LinkDescriptionPopup.showDescriptions = "ON"; + } + } else { + LinkDescriptionPopup.showDescriptions = "OFF"; + LinkDescriptionPopup.descriptionPopup = false; + } + } + render() { const guid = Utils.GenerateGuid(); const flexDir: any = StrCast(this.Document.flexDirection); @@ -155,6 +171,9 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { onPointerDown={e => e.stopPropagation()} > <span className="bottomPopup-text" > Creating link from: {DocumentLinksButton.StartLink.title} </span> + <span className="bottomPopup-descriptions" onClick={this.changeDescriptionSetting} + > Labels: {LinkDescriptionPopup.showDescriptions ? LinkDescriptionPopup.showDescriptions : "ON"} + </span> <span className="bottomPopup-exit" onClick={this.exitLongLinks} >Exit</span> |