diff options
author | Andrew Kim <andrewdkim@users.noreply.github.com> | 2019-02-26 18:34:21 -0500 |
---|---|---|
committer | Andrew Kim <andrewdkim@users.noreply.github.com> | 2019-02-26 18:34:21 -0500 |
commit | 0fce0d7db0986f31a4f1013e42609da382c027e1 (patch) | |
tree | ff59c05ca5c831032bf06655487831af9e466a36 /src/Main.tsx | |
parent | 3898ac2a436a1a6a39b07afb419f433e02df5e29 (diff) |
finished converting from ImageBox to PDFNode
Diffstat (limited to 'src/Main.tsx')
-rw-r--r-- | src/Main.tsx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Main.tsx b/src/Main.tsx index 03d44e0e5..f29dd192e 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -40,18 +40,18 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { //runInAction(() => { - let PDFDoc = Documents.PDFDocument(""); + let PDFDoc = Documents.PDFDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", { + x:0, y:0, width: 500, height: 500, title: "PDF" + }); + let doc1 = Documents.TextDocument({ title: "hello" }); let doc2 = doc1.MakeDelegate(); doc2.Set(KS.X, new NumberField(150)); doc2.Set(KS.Y, new NumberField(20)); - let doc3 = Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", { - x:0, y: 0, width: 500, height: 500,title: "cat 1" - }); + let doc3 = Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", { + x:0, y: 0, width: 500, height: 500,title: "cat 1" + }); - //let PDFDoc = Documents.PDFDocument("https://arxiv.org/pdf/1708.08021.pdf", { - //x: 450, y: 500, title: "PDF!" - //}) // 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 // })); @@ -62,18 +62,18 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { - const docset = [doc3]; //pdfDoc - let doc4 = Documents.CollectionDocument(docset, { + const docset = [PDFDoc]; //pdfDoc + let doc4 = Documents.CollectionDocument(docset, { x: 0, y: 400, title: "mini collection" - }); + }); // 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 = new Array<Document>(doc4);//, doc1, doc3); - let doc6 = Documents.CollectionDocument(docset2, { - x: 350, y: 100, width: 600, height: 600, title: "docking collection" - }); + // let docset2 = new Array<Document>(doc4);//, doc1, doc3); + // let doc6 = Documents.CollectionDocument(docset2, { + // x: 350, y: 100, width: 600, height: 600, title: "docking collection" + //}); let mainNodes = null;// mainContainer.GetFieldT(KeyStore.Data, ListField); if (!mainNodes) { mainNodes = new ListField<Document>(); @@ -81,8 +81,8 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { // mainNodes.Data.push(doc6); // mainNodes.Data.push(doc2); mainNodes.Data.push(doc4); - mainNodes.Data.push(doc3); - //mainNodes.Data.push(PDFDoc); + //mainNodes.Data.push(doc3); + mainNodes.Data.push(PDFDoc); // mainNodes.Data.push(doc5); // mainNodes.Data.push(doc1); //mainNodes.Data.push(doc2); |