aboutsummaryrefslogtreecommitdiff
path: root/src/Main.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-07 23:33:44 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-07 23:33:44 -0500
commit9b942166ca6b09ce4f310928c3daf8503a63ee5c (patch)
treecec530ff1bf61f02f3d1a9e722325d78aa935d70 /src/Main.tsx
parent090093a50397ddc2a8fc2c50f5097f4a4ea8a74c (diff)
Restored Opt<T> and made a new FieldValue<T> type to replace old Opt<T>
Diffstat (limited to 'src/Main.tsx')
-rw-r--r--src/Main.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Main.tsx b/src/Main.tsx
index 6730cf799..a9ed1a365 100644
--- a/src/Main.tsx
+++ b/src/Main.tsx
@@ -46,14 +46,14 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) {
let doc3 = Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", {
x: 450, y: 500, title: "cat 1"
});
- // const schemaDocs = Array.from(Array(5).keys()).map(v => Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", {
- // x: 50 + 100 * v, y: 50, width: 100, height: 100, title: "cat" + v
- // }));
- // schemaDocs[0].SetData(KS.Author, "Tyler", TextField);
- // schemaDocs[4].SetData(KS.Author, "Bob", TextField);
- // schemaDocs.push(doc2);
- // const doc7 = Documents.SchemaDocument(schemaDocs)
- const docset = [doc3]; // [doc1, doc2, doc3, doc7];
+ const schemaDocs = Array.from(Array(5).keys()).map(v => Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", {
+ x: 50 + 100 * v, y: 50, width: 100, height: 100, title: "cat" + v
+ }));
+ schemaDocs[0].SetData(KS.Author, "Tyler", TextField);
+ schemaDocs[4].SetData(KS.Author, "Bob", TextField);
+ schemaDocs.push(doc2);
+ const doc7 = Documents.SchemaDocument(schemaDocs)
+ const docset = [doc1, doc2, doc3, doc7];
let doc4 = Documents.CollectionDocument(docset, {
x: 0, y: 400, title: "mini collection"
});