From 5e1171dd68c227ad6e3a618dd77d0dcd97b2003c Mon Sep 17 00:00:00 2001
From: bob <bcz@cs.brown.edu>
Date: Mon, 28 Jan 2019 12:58:20 -0500
Subject: got rid of force update for doc decs and adjusted point transforms to
 account for collection border width.

---
 src/views/freeformcanvas/CollectionFreeFormView.tsx | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

(limited to 'src/views/freeformcanvas/CollectionFreeFormView.tsx')

diff --git a/src/views/freeformcanvas/CollectionFreeFormView.tsx b/src/views/freeformcanvas/CollectionFreeFormView.tsx
index 437db7493..2233ffcaf 100644
--- a/src/views/freeformcanvas/CollectionFreeFormView.tsx
+++ b/src/views/freeformcanvas/CollectionFreeFormView.tsx
@@ -61,7 +61,6 @@ export class CollectionFreeFormView extends React.Component<IProps> {
             doc.y = docY;
         }
         e.stopPropagation();
-        DocumentDecorations.Instance.forceUpdate();
     }
 
     componentDidMount() {
@@ -115,8 +114,6 @@ export class CollectionFreeFormView extends React.Component<IProps> {
             doc.SetFieldValue(KeyStore.PanY, y + (e.pageY - this._lastY) / currScale, NumberField);
             this._lastX = e.pageX;
             this._lastY = e.pageY;
-
-            DocumentDecorations.Instance.forceUpdate()
         }
     }
 
@@ -137,8 +134,6 @@ export class CollectionFreeFormView extends React.Component<IProps> {
         this.props.Document.SetField(KeyStore.Scale, new NumberField(deltaScale));
         this.props.Document.SetFieldValue(KeyStore.PanX, Panxx + dx, NumberField);
         this.props.Document.SetFieldValue(KeyStore.PanY, Panyy + dy, NumberField);
-
-        DocumentDecorations.Instance.forceUpdate()
     }
 
     onDrop = (e: React.DragEvent): void => {
@@ -200,11 +195,10 @@ export class CollectionFreeFormView extends React.Component<IProps> {
         const panx: number = Document.GetFieldValue(KeyStore.PanX, NumberField, Number(0));
         const pany: number = Document.GetFieldValue(KeyStore.PanY, NumberField, Number(0));
         const currScale: number = Document.GetFieldValue(KeyStore.Scale, NumberField, Number(1));
-        // DocumentDecorations.Instance.forceUpdate()
         return (
             <div className="border" style={{
                 borderStyle: "solid",
-                borderWidth: "2px"
+                borderWidth: "2px",
             }}>
                 <div className="collectionfreeformview-container" onPointerDown={this.onPointerDown} onWheel={this.onPointerWheel} onContextMenu={(e) => e.preventDefault()} style={{
                     width: "100%",
-- 
cgit v1.2.3-70-g09d2

