aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-12 16:38:13 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-12 16:38:13 -0500
commit46a4c26dbadefaf981637f79fb5f76e458baac9d (patch)
tree71ba5836cfbef42fc4e17b699c2bb95ef2e86274 /src/client/views/collections/CollectionFreeFormView.tsx
parent6ef7d8f10b2ec78491b66ea4e2f6cebce3b0230a (diff)
parent7a93f60c9529e5d175e617fc7c07145a9b33e572 (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web into transforms
Diffstat (limited to 'src/client/views/collections/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/CollectionFreeFormView.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionFreeFormView.tsx b/src/client/views/collections/CollectionFreeFormView.tsx
index 5b520676f..975eaaae8 100644
--- a/src/client/views/collections/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/CollectionFreeFormView.tsx
@@ -17,7 +17,7 @@ import { Transform } from "../../util/Transform";
@observer
export class CollectionFreeFormView extends CollectionViewBase {
- public static LayoutString() { return CollectionViewBase.LayoutString("CollectionFreeFormView"); }
+ public static LayoutString(fieldKey: string = "DataKey") { return CollectionViewBase.LayoutString("CollectionFreeFormView", fieldKey); }
private _containerRef = React.createRef<HTMLDivElement>();
private _canvasRef = React.createRef<HTMLDivElement>();
private _lastX: number = 0;
@@ -226,6 +226,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
const value: Document[] = Document.GetList<Document>(this.props.CollectionFieldKey, []);
const panx: number = Document.GetNumber(KeyStore.PanX, 0);
const pany: number = Document.GetNumber(KeyStore.PanY, 0);
+ var me = this;
return (
<div className="collectionfreeformview-container"
@@ -239,7 +240,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
}}
ref={this._containerRef}>
<div className="collectionfreeformview"
- style={{ width: "100%", transform: `translate(${panx}px, ${pany}px) scale(${this.zoomScaling}, ${this.zoomScaling})`, transformOrigin: `left, top` }}
+ style={{ width: "100%", transformOrigin: "left top", transform: ` translate(${panx}px, ${pany}px) scale(${this.zoomScaling}, ${this.zoomScaling})` }}
ref={this._canvasRef}>
{this.props.BackgroundView}
@@ -248,7 +249,7 @@ export class CollectionFreeFormView extends CollectionViewBase {
AddDocument={this.addDocument}
RemoveDocument={this.removeDocument}
GetTransform={this.getTransform}
- Scaling={this.resizeScaling}
+ Scaling={1}
ContainingCollectionView={this} DocumentView={undefined} />);
})}
</div>