From e6d4c8c014704263159688e1d8f8c0c4980615e2 Mon Sep 17 00:00:00 2001
From: Tyler Schicke <tyler_schicke@brown.edu>
Date: Sun, 14 Jul 2019 15:05:53 -0400
Subject: Fixed scale issue with MainOverlayTextBox

---
 src/client/views/MainOverlayTextBox.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'src/client/views/MainOverlayTextBox.tsx')

diff --git a/src/client/views/MainOverlayTextBox.tsx b/src/client/views/MainOverlayTextBox.tsx
index d8aaea259..126efd11c 100644
--- a/src/client/views/MainOverlayTextBox.tsx
+++ b/src/client/views/MainOverlayTextBox.tsx
@@ -1,4 +1,4 @@
-import { action, observable, reaction } from 'mobx';
+import { action, observable, reaction, trace } from 'mobx';
 import { observer } from 'mobx-react';
 import "normalize.css";
 import * as React from 'react';
@@ -51,8 +51,11 @@ export class MainOverlayTextBox extends React.Component<MainOverlayTextBoxProps>
                 if (box) {
                     this.TextDoc = box.props.Document;
                     this.TextDataDoc = box.props.DataDoc;
-                    let sxf = Utils.GetScreenTransform(box ? box.CurrentDiv : undefined);
-                    let xf = () => { box.props.ScreenToLocalTransform(); return new Transform(-sxf.translateX, -sxf.translateY, 1 / sxf.scale); };
+                    let xf = () => {
+                        box.props.ScreenToLocalTransform();
+                        let sxf = Utils.GetScreenTransform(box ? box.CurrentDiv : undefined);
+                        return new Transform(-sxf.translateX, -sxf.translateY, 1 / sxf.scale);
+                    };
                     this.setTextDoc(box.props.fieldKey, box.CurrentDiv, xf, BoolCast(box.props.Document.autoHeight, false) || box.props.height === "min-content");
                 }
                 else {
-- 
cgit v1.2.3-70-g09d2

