From fa2c1b3304cd55654e23a3bf3d3b0ec6d7f6d9a0 Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Mon, 4 Feb 2019 22:20:27 -0500 Subject: More scripting/typescript stuff --- src/Main.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Main.tsx') diff --git a/src/Main.tsx b/src/Main.tsx index 78e1a8af6..aae35aa36 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -46,7 +46,7 @@ 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" }); - console.log(CompileScript("function testFunc(doc: Document): any {return doc.GetNumberField(KeyStore.X, 0)} ")()); + console.log("script: " + CompileScript("(function(doc: Document): any {return doc.GetNumberField(this.KeyStore.X, 0)})")()(doc3)); 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 })); -- cgit v1.2.3-70-g09d2