aboutsummaryrefslogtreecommitdiff
path: root/src/debug/Viewer.tsx
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-07-16 12:38:37 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-07-16 12:38:37 -0400
commit52ea2cbd66bd223730bb370470e706bc05f88fa8 (patch)
treec7a025c9e47e217c94e2fffac6ea354967ad7187 /src/debug/Viewer.tsx
parent3593c1c4a67e8fb398e5a456ad4d758305294625 (diff)
parent03deba08d6af54bfc4235ed7c5ac26b8f673607a (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into presentation-reordering-mohammad
Diffstat (limited to 'src/debug/Viewer.tsx')
-rw-r--r--src/debug/Viewer.tsx24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/debug/Viewer.tsx b/src/debug/Viewer.tsx
index b22300d0b..2b3eed154 100644
--- a/src/debug/Viewer.tsx
+++ b/src/debug/Viewer.tsx
@@ -10,6 +10,15 @@ import { List } from '../new_fields/List';
import { URLField } from '../new_fields/URLField';
import { EditableView } from '../client/views/EditableView';
import { CompileScript } from '../client/util/Scripting';
+import { DateField } from '../new_fields/DateField';
+import { ScriptField } from '../new_fields/ScriptField';
+import CursorField from '../new_fields/CursorField';
+
+DateField;
+URLField;
+ScriptField;
+CursorField;
+
function applyToDoc(doc: { [index: string]: FieldResult }, key: string, scriptString: string): boolean;
function applyToDoc(doc: { [index: number]: FieldResult }, key: number, scriptString: string): boolean;
@@ -169,9 +178,12 @@ class Viewer extends React.Component {
}
}
-ReactDOM.render((
- <div style={{ position: "absolute", width: "100%", height: "100%" }}>
- <Viewer />
- </div>),
- document.getElementById('root')
-); \ No newline at end of file
+(async function () {
+ await DocServer.init(window.location.protocol, window.location.hostname, 4321, "viewer");
+ ReactDOM.render((
+ <div style={{ position: "absolute", width: "100%", height: "100%" }}>
+ <Viewer />
+ </div>),
+ document.getElementById('root')
+ );
+})(); \ No newline at end of file