aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorab <abdullah_ahmed@brown.edu>2019-04-08 18:11:45 -0400
committerab <abdullah_ahmed@brown.edu>2019-04-08 18:11:45 -0400
commit5f9f7821bca6a9c5733e13e3d121661e18b779f7 (patch)
treecceb6107d9b395417a48559fce879082d387b04e /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
parent9e4dd13ae2f0061ebea6aa8809a5607b51b9d8c3 (diff)
parenta72fcdd0ebc06a3c851007c6ed89ab13a9a0d835 (diff)
Merge branches 'undo-expansion' and 'master' of https://github.com/browngraphicslab/Dash-Web into undo-expansion
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 37bb78151..f99ba111c 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -21,6 +21,7 @@ import v5 = require("uuid/v5");
import { CollectionFreeFormRemoteCursors } from "./CollectionFreeFormRemoteCursors";
import { PreviewCursor } from "./PreviewCursor";
import { NumberField } from "../../../../fields/NumberField";
+import { Main } from "../../Main";
@observer
export class CollectionFreeFormView extends CollectionViewBase {
@@ -185,6 +186,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
@action
private SetPan(panX: number, panY: number) {
+ Main.Instance.SetTextDoc(undefined, undefined);
var x1 = this.getLocalTransform().inverse().Scale;
const newPanX = Math.min((1 - 1 / x1) * this.nativeWidth, Math.max(0, panX));
const newPanY = Math.min((1 - 1 / x1) * this.nativeHeight, Math.max(0, panY));