aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorMonika Hedman <monika_hedman@brown.edu>2019-02-26 20:44:32 -0500
committerMonika Hedman <monika_hedman@brown.edu>2019-02-26 20:44:32 -0500
commit98ade639c6ffa6cc704cc310af506973d83e494b (patch)
treec28ef4bf3fb9d37799cac32362335bdf1dd8c272 /src/client/views/collections/CollectionFreeFormView.tsx
parentd0f80bd2704c95b5045b3a14035b04b64e1b7ed6 (diff)
what is going ON
Diffstat (limited to 'src/client/views/collections/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/CollectionFreeFormView.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx
index ac14811a5..fe2fc42ad 100644
--- a/src/client/views/collections/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/CollectionFreeFormView.tsx
@@ -21,6 +21,7 @@ import "./CollectionFreeFormView.scss";
import { COLLECTION_BORDER_WIDTH } from "./CollectionView";
import { CollectionViewBase } from "./CollectionViewBase";
import React = require("react");
+import { DocumentManager } from "../DocumentManager";
const JsxParser = require('react-jsx-parser').default;//TODO Why does this need to be imported like this?
@observer
@@ -191,7 +192,14 @@ export class CollectionFreeFormView extends CollectionViewBase {
ContentScaling={this.noScaling}
PanelWidth={doc.Width}
PanelHeight={doc.Height}
- ContainingCollectionView={this.props.CollectionView} />);
+ ContainingCollectionView={this.props.CollectionView}
+ focus={(doc: Document, x: number, y: number) => {
+ //set pan of colleciton freeform and then call parent
+ console.log("calling...")
+ DocumentManager.Instance.centerNode(doc, doc.GetNumber(KeyStore.X, 0), doc.GetNumber(KeyStore.Y, 0))
+ this.props.focus(this.props.Document, doc.GetNumber(KeyStore.X, 0), doc.GetNumber(KeyStore.Y, 0))
+ }}
+ />);
})
}
return null;