From 98ade639c6ffa6cc704cc310af506973d83e494b Mon Sep 17 00:00:00 2001
From: Monika Hedman <monika_hedman@brown.edu>
Date: Tue, 26 Feb 2019 20:44:32 -0500
Subject: what is going ON

---
 src/client/views/nodes/DocumentView.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/DocumentView.tsx')

diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 21f64ef35..90699cd2e 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -36,6 +36,7 @@ export interface DocumentViewProps {
     ContentScaling: () => number;
     PanelWidth: () => number;
     PanelHeight: () => number;
+    focus: (doc: Document, x: number, y: number) => void;
 }
 export interface JsxArgs extends DocumentViewProps {
     Keys: { [name: string]: Key }
@@ -184,7 +185,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
     //TODO Monika
     @action
     Center = (e: React.MouseEvent): void => {
-        DocumentManager.Instance.centerNode(this)
+        this.props.focus(this.props.Document, this.props.Document.GetNumber(KeyStore.X, 0), this.props.Document.GetNumber(KeyStore.Y, 0))
     }
 
     @action
@@ -265,7 +266,8 @@ export class DocumentView extends React.Component<DocumentViewProps> {
             ...this.props,
             isSelected: this.isSelected,
             select: this.select,
-            documentSize: this.size
+            documentSize: this.size,
+            focus: this.props.focus
         };
         for (const key of this.layoutKeys) {
             this._documentBindings[key.Name + "Key"] = key;  // this maps string values of the form <keyname>Key to an actual key Kestore.keyname  e.g,   "DataKey" => KeyStore.Data
-- 
cgit v1.2.3-70-g09d2

