diff options
author | tschicke-brown <tyler_schicke@brown.edu> | 2019-02-07 23:50:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-07 23:50:47 -0500 |
commit | 35574735a60fbc7b1c7051c59db56a8485f50a21 (patch) | |
tree | 42dc1f8fbe639d53e7c6d3db144bd30d984c21de /src/Main.tsx | |
parent | 8d264be35a511204449c22d0a4b1754e241a3421 (diff) | |
parent | 90296f23320df43e73fb1bd936428f19f0f705a9 (diff) |
Merge pull request #5 from browngraphicslab/schema
Schema
Diffstat (limited to 'src/Main.tsx')
-rw-r--r-- | src/Main.tsx | 16 |
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" }); |