diff options
author | bob <bcz@cs.brown.edu> | 2019-02-05 12:29:57 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-02-05 12:29:57 -0500 |
commit | 6e66f8b227c730e07863a93a8bce5ee0d51d2ddc (patch) | |
tree | 80b01b5569b968a808ccf422d83bc45a5bd7d9ac /src/views/nodes/DocumentView.tsx | |
parent | 7740c0010944cfa215c9b21b113f030199ffab82 (diff) |
working refactored version.
Diffstat (limited to 'src/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/views/nodes/DocumentView.tsx | 8 |
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} |