aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2019-02-12 22:18:26 -0500
committerbobzel <zzzman@gmail.com>2019-02-12 22:18:26 -0500
commitb48e9b7850d0d244ce1fe519863b32969ed2c7d2 (patch)
tree3df02f7c80d6228c25444a5f4fabf71c8d16ac0d /src/client/views/nodes/DocumentView.tsx
parent9c25c122a0f2728db8c1bd9b622ce924086105f6 (diff)
minor cleanup
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index bc3017275..9607a4984 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -171,13 +171,12 @@ export class DocumentView extends React.Component<DocumentViewProps> {
onError={(test: any) => { console.log(test) }}
/>;
bindings["BackgroundView"] = this.backgroundLayout ? annotated : null;
- bindings["ParentScaling"] = 1;
- 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%";
+ var nativewidth = this.props.Document.GetNumber(KeyStore.NativeWidth, 0);
+ var nativeheight = this.props.Document.GetNumber(KeyStore.NativeHeight, 0);
+ var width = nativewidth > 0 ? nativewidth + "px" : "100%";
+ var height = nativeheight > 0 ? nativeheight + "px" : "100%";
return (
- <div className="node" ref={this._mainCont} style={{ width: strwidth, height: strheight, transformOrigin: "0 0", transform: `scale(${this.props.ParentScaling},${this.props.ParentScaling})` }}>
+ <div className="node" ref={this._mainCont} style={{ width: width, height: height, transformOrigin: "0 0", transform: `scale(${this.props.ParentScaling},${this.props.ParentScaling})` }}>
<JsxParser
components={{ FormattedTextBox: FormattedTextBox, ImageBox, CollectionFreeFormView, CollectionDockingView, CollectionSchemaView }}
bindings={bindings}