aboutsummaryrefslogtreecommitdiff
path: root/src/views/nodes/DocumentView.tsx
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/views/nodes/DocumentView.tsx
parent7740c0010944cfa215c9b21b113f030199ffab82 (diff)
working refactored version.
Diffstat (limited to 'src/views/nodes/DocumentView.tsx')
-rw-r--r--src/views/nodes/DocumentView.tsx8
1 files changed, 3 insertions, 5 deletions
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}