aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-12 16:38:13 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-12 16:38:13 -0500
commit46a4c26dbadefaf981637f79fb5f76e458baac9d (patch)
tree71ba5836cfbef42fc4e17b699c2bb95ef2e86274 /src/client/views/nodes/DocumentView.tsx
parent6ef7d8f10b2ec78491b66ea4e2f6cebce3b0230a (diff)
parent7a93f60c9529e5d175e617fc7c07145a9b33e572 (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web into transforms
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 7503e9fc7..d7ecc6d9d 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -93,8 +93,13 @@ export class DocumentView extends React.Component<DocumentViewProps> {
onError={(test: any) => { console.log(test) }}
/>;
bindings["BackgroundView"] = this.backgroundLayout ? annotated : null;
+
+ var width = this.props.Document.GetNumber(KeyStore.NativeWidth, 0);
+ var strwidth = width > 0 ? width.toString() + "px" : "100%";
+ var height = this.props.Document.GetNumber(KeyStore.NativeHeight, 0);
+ var strheight = height > 0 ? height.toString() + "px" : "100%";
return (
- <div className="node" ref={this._mainCont} style={{ width: "100%", height: "100%", }}>
+ <div className="node" ref={this._mainCont} style={{ width: strwidth, height: strheight, transformOrigin: "left top", transform: `scale(${this.props.Scaling},${this.props.Scaling})` }}>
<JsxParser
components={{ FormattedTextBox: FormattedTextBox, ImageBox, CollectionFreeFormView, CollectionDockingView, CollectionSchemaView }}
bindings={bindings}