aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ContentFittingDocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-25 23:36:24 -0400
committerbobzel <zzzman@gmail.com>2020-10-25 23:36:24 -0400
commitf4ab30f9a939587ddebfb50f55d999b458954bfb (patch)
treeda63a7a5afa12888515fd81cd843413643b1ce4d /src/client/views/nodes/ContentFittingDocumentView.tsx
parent71ed3b7e1a817da7f2aca20da678aaaa4feda3b6 (diff)
fixed placement of link button for scaled text views. fixed document decorations for ContentFittingDocViews & fitWidth items. Fixed documentDeocrations for CollectionMulticolumn view.
Diffstat (limited to 'src/client/views/nodes/ContentFittingDocumentView.tsx')
-rw-r--r--src/client/views/nodes/ContentFittingDocumentView.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/views/nodes/ContentFittingDocumentView.tsx b/src/client/views/nodes/ContentFittingDocumentView.tsx
index bc3926ff4..bc3ad5bce 100644
--- a/src/client/views/nodes/ContentFittingDocumentView.tsx
+++ b/src/client/views/nodes/ContentFittingDocumentView.tsx
@@ -38,7 +38,13 @@ export class ContentFittingDocumentView extends React.Component<DocumentViewProp
private PanelHeight = () => this.panelHeight;
@computed get panelWidth() { return this.nativeWidth() && !this.props.Document._fitWidth ? this.nativeWidth() * this.contentScaling() : this.props.PanelWidth(); }
- @computed get panelHeight() { return this.nativeHeight() && !this.props.Document._fitWidth ? this.nativeHeight() * this.contentScaling() : this.props.PanelHeight(); }
+ @computed get panelHeight() {
+ if (this.nativeHeight()) {
+ if (!this.props.Document._fitWidth) return this.nativeHeight() * this.contentScaling()
+ else return this.panelWidth / Doc.NativeAspect(this.layoutDoc, this.props.DataDoc, this.freezeDimensions) || 1;
+ }
+ return this.props.PanelHeight();
+ }
@computed get childXf() { return this.props.DataDoc ? 1 : 1 / this.contentScaling(); } // this is intended to detect when a document is being rendered inside itself as part of a template, but not as a leaf node where nativeWidth & height would apply.
private getTransform = () => this.props.dontCenter ?