diff options
| author | bob <bcz@cs.brown.edu> | 2020-03-09 13:49:21 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-03-09 13:49:21 -0400 |
| commit | cabb2cf9065d85112f1bd89e31b41dafdbc4ba54 (patch) | |
| tree | 03ba4354fcaa0cdbd12db1e2a06bedb1421a0b7e /src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx | |
| parent | d46ff869dcbb3d5cadeeb9ad6251ef5f9a5c3b2d (diff) | |
fixed showing links only to doculink boxes. changed field names for links to be more readable.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx index 044d35eca..85b75f5cb 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx @@ -10,6 +10,7 @@ import React = require("react"); import { Utils } from "../../../../Utils"; import { SelectionManager } from "../../../util/SelectionManager"; import { DocumentType } from "../../../documents/DocumentTypes"; +import { StrCast } from "../../../../new_fields/Types"; @observer export class CollectionFreeFormLinksView extends React.Component { @@ -86,7 +87,7 @@ export class CollectionFreeFormLinksView extends React.Component { } return drawnPairs; }, [] as { a: DocumentView, b: DocumentView, l: Doc[] }[]); - return connections.filter(c => c.a.props.Document.type === DocumentType.LINK) // get rid of the filter to show links to documents in addition to document anchors + return connections.filter(c => c.a.props.Document.type === DocumentType.LINK && StrCast(c.a.props.Document.layout).includes("DocuLinkBox")) // get rid of the filter to show links to documents in addition to document anchors .map(c => <CollectionFreeFormLinkView key={Utils.GenerateGuid()} A={c.a} B={c.b} LinkDocs={c.l} />); } |
