diff options
author | Monika Hedman <monika_hedman@brown.edu> | 2019-02-18 19:03:34 -0500 |
---|---|---|
committer | Monika Hedman <monika_hedman@brown.edu> | 2019-02-18 19:03:34 -0500 |
commit | eaeb373ed90d35ab1c29cd9c3e4a79f6c8fa30b0 (patch) | |
tree | 2adb423bf0f782fce6861d703114bc0140520766 /src/client/views/Main.tsx | |
parent | 30986620c34c93e12509b2875e90cf5876838403 (diff) | |
parent | 842f571bfb4952d12804a8dbdc66aedbf2bf6b81 (diff) |
transforms update
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r-- | src/client/views/Main.tsx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index 38e353055..0532cbc1f 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -46,12 +46,13 @@ let doc2 = doc1.MakeDelegate(); doc2.Set(KS.X, new NumberField(150)); doc2.Set(KS.Y, new NumberField(20)); let doc3 = Documents.ImageDocument("https://psmag.com/.image/t_share/MTMyNzc2NzM1MDY1MjgzMDM4/shutterstock_151341212jpg.jpg", { - x: 450, y: 100, title: "cat 1", width: 606, height: 386, nativeWidth: 606, nativeHeight: 386 + x: 450, y: 100, title: "dog", width: 606, height: 386, nativeWidth: 606, nativeHeight: 386 }); //doc3.Set(KeyStore.Data, new ImageField); const schemaDocs = Array.from(Array(5).keys()).map(v => Documents.ImageDocument("https://psmag.com/.image/t_share/MTMyNzc2NzM1MDY1MjgzMDM4/shutterstock_151341212jpg.jpg", { x: 50 + 100 * v, y: 50, width: 100, height: 100, title: "cat" + v, nativeWidth: 606, nativeHeight: 386 })); +schemaDocs.push(doc3); schemaDocs[0].SetData(KS.Author, "Tyler", TextField); schemaDocs[4].SetData(KS.Author, "Bob", TextField); schemaDocs.push(doc2); @@ -63,10 +64,10 @@ let doc4 = Documents.CollectionDocument(docset, { // let doc5 = Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", { // x: 650, y: 500, width: 600, height: 600, title: "cat 2" // }); -let docset2 = [doc3, doc1, doc2]; -// let doc6 = Documents.CollectionDocument(docset2, { -// x: 350, y: 100, width: 600, height: 600, title: "docking collection" -// }); +let docset2 = [doc3, doc4, doc2]; +let doc6 = Documents.CollectionDocument(docset2, { + x: 350, y: 100, width: 600, height: 600, title: "docking collection" +}); let mainNodes = mainContainer.GetOrCreate<ListField<Document>>(KeyStore.Data, ListField); // mainNodes.Data.push(doc6); // mainNodes.Data.push(doc2); @@ -75,7 +76,7 @@ mainNodes.Data.push(doc3); // mainNodes.Data.push(doc5); // mainNodes.Data.push(doc1); // mainNodes.Data.push(doc2); -//mainNodes.Data.push(doc6); +mainNodes.Data.push(doc6); //} //); @@ -83,7 +84,7 @@ mainNodes.Data.push(doc3); ReactDOM.render(( <div style={{ position: "absolute", width: "100%", height: "100%" }}> <DocumentView Document={mainContainer} - AddDocument={undefined} RemoveDocument={undefined} GetTransform={() => Transform.Identity} + AddDocument={undefined} RemoveDocument={undefined} ScreenToLocalTransform={() => Transform.Identity} Scaling={1} isTopMost={true} ContainingCollectionView={undefined} DocumentView={undefined} /> |