aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-02-05 12:29:57 -0500
committerbob <bcz@cs.brown.edu>2019-02-05 12:29:57 -0500
commit6e66f8b227c730e07863a93a8bce5ee0d51d2ddc (patch)
tree80b01b5569b968a808ccf422d83bc45a5bd7d9ac /src
parent7740c0010944cfa215c9b21b113f030199ffab82 (diff)
working refactored version.
Diffstat (limited to 'src')
-rw-r--r--src/Main.tsx4
-rw-r--r--src/views/nodes/DocumentView.tsx8
2 files changed, 5 insertions, 7 deletions
diff --git a/src/Main.tsx b/src/Main.tsx
index b72083ee6..247733d3a 100644
--- a/src/Main.tsx
+++ b/src/Main.tsx
@@ -66,14 +66,14 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) {
if (!mainNodes) {
mainNodes = new ListField<Document>();
}
- mainNodes.Data.push(doc1);
+ // mainNodes.Data.push(doc6);
// mainNodes.Data.push(doc2);
mainNodes.Data.push(doc4);
// mainNodes.Data.push(doc3);
// mainNodes.Data.push(doc5);
// mainNodes.Data.push(doc1);
//mainNodes.Data.push(doc2);
- mainNodes.Data.push(doc7);
+ mainNodes.Data.push(doc6);
mainContainer.SetField(KeyStore.Data, mainNodes);
}
//);
diff --git a/src/views/nodes/DocumentView.tsx b/src/views/nodes/DocumentView.tsx
index 7b81752ad..a1262e2ba 100644
--- a/src/views/nodes/DocumentView.tsx
+++ b/src/views/nodes/DocumentView.tsx
@@ -130,7 +130,8 @@ export class DocumentView extends React.Component<DocumentViewProps> {
for (const key of this.layoutKeys) {
bindings[key.Name + "Key"] = key;
}
- bindings.DocumentView = this;
+ if (bindings.DocumentView === undefined)
+ bindings.DocumentView = this;
for (const key of this.layoutFields) {
let field = doc.GetField(key);
if (field) {
@@ -138,10 +139,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
}
}
return (
- <div className="node" ref={this._mainCont} style={{
- width: "100%",
- height: "100%",
- }}>
+ <div className="node" ref={this._mainCont} style={{ width: "100%", height: "100%", }}>
<JsxParser
components={{ FormattedTextBox: FormattedTextBox, ImageBox, CollectionFreeFormView, CollectionDockingView, CollectionSchemaView }}
bindings={bindings}