diff options
| author | eeng5 <eleanor_eng@brown.edu> | 2020-02-09 14:59:57 -0500 |
|---|---|---|
| committer | eeng5 <eleanor_eng@brown.edu> | 2020-02-09 14:59:57 -0500 |
| commit | daa8898f70bd44d2716f1f0d3371a8435a3ff638 (patch) | |
| tree | ccb2ea544eeed0413370cdd69e758faec6170690 /src/client/documents | |
| parent | 1e36055e3674fe33dd39f6ad79c969531f7b447c (diff) | |
| parent | f6179334d6f2942631caa17b7c8ae2531d87c7c4 (diff) | |
Merge branch 'pen' of https://github.com/browngraphicslab/Dash-Web into pen
Diffstat (limited to 'src/client/documents')
| -rw-r--r-- | src/client/documents/DocumentTypes.ts | 1 | ||||
| -rw-r--r-- | src/client/documents/Documents.ts | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts index 8f96b2fa6..df056f3e0 100644 --- a/src/client/documents/DocumentTypes.ts +++ b/src/client/documents/DocumentTypes.ts @@ -19,6 +19,7 @@ export enum DocumentType { YOUTUBE = "youtube", FONTICON = "fonticonbox", PRES = "presentation", + RECOMMENDATION = "recommendation", LINKFOLLOW = "linkfollow", PRESELEMENT = "preselement", QUERY = "search", diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 81a6ff802..4b5152224 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -43,6 +43,9 @@ import { PresBox } from "../views/nodes/PresBox"; import { ComputedField, ScriptField } from "../../new_fields/ScriptField"; import { ProxyField } from "../../new_fields/Proxy"; import { DocumentType } from "./DocumentTypes"; +import { RecommendationsBox } from "../views/RecommendationsBox"; +//import { PresBox } from "../views/nodes/PresBox"; +//import { PresField } from "../../new_fields/PresField"; import { LinkFollowBox } from "../views/linking/LinkFollowBox"; import { PresElementBox } from "../views/presentationview/PresElementBox"; import { QueryBox } from "../views/nodes/QueryBox"; @@ -239,6 +242,10 @@ export namespace Docs { layout: { view: FontIconBox, dataField: data }, options: { _width: 40, _height: 40, borderRounding: "100%" }, }], + [DocumentType.RECOMMENDATION, { + layout: { view: RecommendationsBox }, + options: { width: 200, height: 200 }, + }], [DocumentType.LINKFOLLOW, { layout: { view: LinkFollowBox, dataField: data } }], @@ -577,6 +584,10 @@ export namespace Docs { return InstanceFromProto(Prototypes.get(DocumentType.IMPORT), new List<Doc>(), options); } + export function RecommendationsDocument(data: Doc[], options: DocumentOptions = {}) { + return InstanceFromProto(Prototypes.get(DocumentType.RECOMMENDATION), new List<Doc>(data), options); + } + export type DocConfig = { doc: Doc, initialWidth?: number, |
