aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-19 21:31:02 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-19 21:31:02 -0500
commitb24f606727ef4696a2bad8bc5ebf9c7c8252c620 (patch)
treef9ab618dc448aa7380a327bd54d47747615e2b58
parent7bcdce059eb95a4119181353a77975cc7d8fe392 (diff)
small cleanup
-rw-r--r--src/client/views/nodes/DocumentView.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 518add0fc..1f3567f6a 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -254,9 +254,12 @@ export class DocumentView extends React.Component<DocumentViewProps> {
if (!lkeys || lkeys === "<Waiting>") {
return <p>Error loading layout keys</p>;
}
- let bindings = { ...this.props } as any;
- bindings.isSelected = this.isSelected;
- bindings.select = this.select;
+ let bindings = {
+ ...this.props,
+ ScreenToLocalTransform: this.screenToLocalTransform, // adds 'Scaling' to the screen to local Xf
+ isSelected: this.isSelected,
+ select: this.select
+ } as any;
for (const key of this.layoutKeys) {
bindings[key.Name + "Key"] = key; // this maps string values of the form <keyname>Key to an actual key Kestore.keyname e.g, "DataKey" => KeyStore.Data
}
@@ -282,7 +285,6 @@ export class DocumentView extends React.Component<DocumentViewProps> {
bindings.BackgroundView = backgroundView;
}
- bindings.ScreenToLocalTransform = this.screenToLocalTransform; // adds 'Scaling' to the screen to local Xf
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);