aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-07-27 17:19:00 -0400
committerFawn <fangrui_tong@brown.edu>2019-07-27 17:19:00 -0400
commitf02e8416239b612f40dd2c65d6ca9173e81fb1a9 (patch)
tree6541914e8d71f7dd57e66ed7fbc7679820d7594b /src/client/views/nodes/CollectionFreeFormDocumentView.tsx
parent905d77804bf9a810822e5e43f0cd06019aef7620 (diff)
parent606e87ccd9c06c83114d5962382cd76def86f103 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into schema_view_improvements_2
Diffstat (limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx')
-rw-r--r--src/client/views/nodes/CollectionFreeFormDocumentView.tsx16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index 389b9f68b..7ffd760e0 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -35,21 +35,9 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
@computed get zoom(): number { return 1 / FieldValue(this.Document.zoomBasis, 1); }
@computed get nativeWidth(): number { return FieldValue(this.Document.nativeWidth, 0); }
@computed get nativeHeight(): number { return FieldValue(this.Document.nativeHeight, 0); }
-
- set width(w: number) {
- this.Document.width = w;
- if (this.nativeWidth && this.nativeHeight) {
- this.Document.height = this.nativeHeight / this.nativeWidth * w;
- }
- }
- set height(h: number) {
- this.Document.height = h;
- if (this.nativeWidth && this.nativeHeight) {
- this.Document.width = this.nativeWidth / this.nativeHeight * h;
- }
- }
@computed get scaleToOverridingWidth() { return this.width / NumCast(this.props.Document.width, this.width); }
- contentScaling = () => this.nativeWidth > 0 ? this.width / this.nativeWidth : 1;
+
+ contentScaling = () => this.nativeWidth > 0 && !BoolCast(this.props.Document.ignoreAspect) ? this.width / this.nativeWidth : 1;
panelWidth = () => this.props.PanelWidth();
panelHeight = () => this.props.PanelHeight();
getTransform = (): Transform => this.props.ScreenToLocalTransform()