diff options
Diffstat (limited to 'src/Main.tsx')
-rw-r--r-- | src/Main.tsx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/Main.tsx b/src/Main.tsx index 6730cf799..dd8313ac1 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -14,6 +14,7 @@ import { ContextMenu } from './views/ContextMenu'; import { DocumentView } from './views/nodes/DocumentView'; import { CompileScript } from './util/Scripting'; +//pdf url: https://arxiv.org/pdf/1708.08021.pdf configure({ enforceActions: "observed" @@ -44,8 +45,12 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { 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: 450, y: 500, title: "cat 1" + 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 // })); @@ -53,10 +58,14 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { // schemaDocs[4].SetData(KS.Author, "Bob", TextField); // schemaDocs.push(doc2); // const doc7 = Documents.SchemaDocument(schemaDocs) - const docset = [doc3]; // [doc1, doc2, doc3, doc7]; + + + + const docset = [doc3]; //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" // }); @@ -72,6 +81,7 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { // mainNodes.Data.push(doc2); mainNodes.Data.push(doc4); mainNodes.Data.push(doc3); + //mainNodes.Data.push(PDFDoc); // mainNodes.Data.push(doc5); // mainNodes.Data.push(doc1); //mainNodes.Data.push(doc2); |