aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authoreeng5 <eleanor_eng@brown.edu>2020-02-09 14:59:57 -0500
committereeng5 <eleanor_eng@brown.edu>2020-02-09 14:59:57 -0500
commitdaa8898f70bd44d2716f1f0d3371a8435a3ff638 (patch)
treeccb2ea544eeed0413370cdd69e758faec6170690 /src/client/documents/Documents.ts
parent1e36055e3674fe33dd39f6ad79c969531f7b447c (diff)
parentf6179334d6f2942631caa17b7c8ae2531d87c7c4 (diff)
Merge branch 'pen' of https://github.com/browngraphicslab/Dash-Web into pen
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts11
1 files changed, 11 insertions, 0 deletions
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,