diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-04 22:20:27 -0500 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-02-05 18:48:53 -0500 |
commit | fa2c1b3304cd55654e23a3bf3d3b0ec6d7f6d9a0 (patch) | |
tree | 0c4a36ee576226daec098f777e58147c1ff909d5 /src/Main.tsx | |
parent | 136194eba78c0427926cba0be9a11650e6f4be2b (diff) |
More scripting/typescript stuff
Diffstat (limited to 'src/Main.tsx')
-rw-r--r-- | src/Main.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
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 })); |