diff options
| author | kimdahey <claire_kim1@brown.edu> | 2019-12-03 16:32:13 -0500 |
|---|---|---|
| committer | kimdahey <claire_kim1@brown.edu> | 2019-12-03 16:32:13 -0500 |
| commit | 70583fa47bd9920d1823d381708c81283534d6ce (patch) | |
| tree | 5c81976813436852403ea352797efe1d518dbb1a /src/client/views/nodes/ContentFittingDocumentView.tsx | |
| parent | 56b83d89f37a5523ab319977e3385f539ecaf996 (diff) | |
| parent | 213962406327cc2f7267064f3016fabf0fd16872 (diff) | |
merged w master
Diffstat (limited to 'src/client/views/nodes/ContentFittingDocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/ContentFittingDocumentView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/ContentFittingDocumentView.tsx b/src/client/views/nodes/ContentFittingDocumentView.tsx index 573a55710..efc907f9b 100644 --- a/src/client/views/nodes/ContentFittingDocumentView.tsx +++ b/src/client/views/nodes/ContentFittingDocumentView.tsx @@ -47,7 +47,7 @@ export class ContentFittingDocumentView extends React.Component<ContentFittingDo private get nativeWidth() { return NumCast(this.layoutDoc!.nativeWidth, this.props.PanelWidth()); } private get nativeHeight() { return NumCast(this.layoutDoc!.nativeHeight, this.props.PanelHeight()); } private contentScaling = () => { - let wscale = this.props.PanelWidth() / (this.nativeWidth ? this.nativeWidth : this.props.PanelWidth()); + const wscale = this.props.PanelWidth() / (this.nativeWidth ? this.nativeWidth : this.props.PanelWidth()); if (wscale * this.nativeHeight > this.props.PanelHeight()) { return this.props.PanelHeight() / (this.nativeHeight ? this.nativeHeight : this.props.PanelHeight()); } @@ -59,7 +59,7 @@ export class ContentFittingDocumentView extends React.Component<ContentFittingDo drop = (e: Event, de: DragManager.DropEvent) => { if (de.data instanceof DragManager.DocumentDragData) { this.props.childDocs && this.props.childDocs.map(otherdoc => { - let target = Doc.GetProto(otherdoc); + const target = Doc.GetProto(otherdoc); target.layout = ComputedField.MakeFunction("this.image_data[0]"); target.layoutCustom = Doc.MakeDelegate(de.data.draggedDocuments[0]); }); @@ -82,7 +82,7 @@ export class ContentFittingDocumentView extends React.Component<ContentFittingDo transform: `translate(${this.centeringOffset}px, 0px)`, borderRadius: this.borderRounding, height: this.props.PanelHeight(), - width: this.props.PanelWidth() + width: `${100 * (this.props.PanelWidth() - this.centeringOffset * 2) / this.props.PanelWidth()}%` }}> <DocumentView {...this.props} DataDoc={this.props.DataDocument} |
