aboutsummaryrefslogtreecommitdiff
path: root/src/Main.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-05 18:03:26 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-05 18:49:00 -0500
commit41afca0448b4e75459fc8aeb53192f6a44aa2b18 (patch)
tree7b89148d9ff67b81733df99609ad9a874376bf78 /src/Main.tsx
parent164f7e35edae1ee037905549ecbe90584272b4d5 (diff)
Cleaned up other scripting stuff
Diffstat (limited to 'src/Main.tsx')
-rw-r--r--src/Main.tsx10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/Main.tsx b/src/Main.tsx
index d79909545..d4d397125 100644
--- a/src/Main.tsx
+++ b/src/Main.tsx
@@ -46,7 +46,6 @@ doc2.SetField(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"
});
-console.log("script: " + CompileScript("(function(doc: Document): any {return doc.GetNumberField(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
}));
@@ -81,19 +80,10 @@ mainContainer.SetField(KeyStore.Data, mainNodes);
//}
//);
-function keydown(e: React.KeyboardEvent<HTMLTextAreaElement>) {
- if (e.key == "Enter" && e.ctrlKey) {
- console.log(CompileScript(e.currentTarget.value)()([doc1, doc2, doc3, doc4, doc5]));
- e.preventDefault();
- e.stopPropagation();
- }
-}
-
ReactDOM.render((
<div style={{ position: "absolute", width: "100%", height: "100%" }}>
<DocumentView Document={mainContainer} ContainingCollectionView={undefined} ContainingDocumentView={undefined} />
<DocumentDecorations />
<ContextMenu />
- <textarea onKeyDown={keydown} style={{ position: "absolute", left: "0px", top: "0px" }} />
</div>),
document.getElementById('root')); \ No newline at end of file