aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ContentFittingDocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-11-10 20:59:44 -0500
committerbobzel <zzzman@gmail.com>2020-11-10 20:59:44 -0500
commit2f199e382cad9578fb08b186bf6bd50ab5868a39 (patch)
tree67434c84b0a6c85cd6ec4d98f586bf63db6f05ab /src/client/views/nodes/ContentFittingDocumentView.tsx
parente14f9c12eba91bb5ecd3935ccbd3d20928e263a9 (diff)
fixed Slides to be Colllections (not text) and fixed dockingView to display collections properly.
Diffstat (limited to 'src/client/views/nodes/ContentFittingDocumentView.tsx')
-rw-r--r--src/client/views/nodes/ContentFittingDocumentView.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/ContentFittingDocumentView.tsx b/src/client/views/nodes/ContentFittingDocumentView.tsx
index 082f9a9e8..70a40f39e 100644
--- a/src/client/views/nodes/ContentFittingDocumentView.tsx
+++ b/src/client/views/nodes/ContentFittingDocumentView.tsx
@@ -8,6 +8,7 @@ import { emptyFunction, OmitKeys, returnVal } from "../../../Utils";
import { DocumentView, DocumentViewProps } from "../nodes/DocumentView";
import "./ContentFittingDocumentView.scss";
import { CollectionViewType } from "../collections/CollectionView";
+import { DocumentType } from "../../documents/DocumentTypes";
interface ContentFittingDocumentViewProps {
dontCenter?: boolean;
@@ -23,7 +24,7 @@ export class ContentFittingDocumentView extends React.Component<DocumentViewProp
}
@computed get freezeDimensions() { return this.props.FreezeDimensions; }
- trueNativeWidth = () => this.nativeWidth(); // returnVal(this.props.NativeWidth?.(), Doc.NativeWidth(this.layoutDoc, this.props.DataDoc, false));
+ trueNativeWidth = () => returnVal(this.props.NativeWidth?.(), Doc.NativeWidth(this.layoutDoc, this.props.DataDoc, false));
nativeWidth = () => returnVal(this.props.NativeWidth?.(), Doc.NativeWidth(this.layoutDoc, this.props.DataDoc, this.freezeDimensions) || this.props.PanelWidth());
nativeHeight = () => returnVal(this.props.NativeHeight?.(), Doc.NativeHeight(this.layoutDoc, this.props.DataDoc, this.freezeDimensions) || this.props.PanelHeight());
@computed get nativeScaling() {
@@ -56,7 +57,8 @@ export class ContentFittingDocumentView extends React.Component<DocumentViewProp
@computed get borderRounding() { return StrCast(this.props.Document?.borderRounding); }
contentScaling = () => {
- return this.nativeScaling * Math.min(this.props.PanelWidth(), this.layoutDoc[WidthSym]()) / this.layoutWidth();
+ if ((this.props.LayoutTemplateString || StrCast(this.layoutDoc.layout)).includes("FormattedTextBox")) return this.nativeScaling;
+ return this.nativeScaling * this.layoutDoc[WidthSym]() / this.layoutWidth();
}
layoutWidth = () => {