From 2f199e382cad9578fb08b186bf6bd50ab5868a39 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Tue, 10 Nov 2020 20:59:44 -0500
Subject: fixed Slides to be Colllections (not text) and fixed dockingView to
 display collections properly.

---
 src/client/views/nodes/ContentFittingDocumentView.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/ContentFittingDocumentView.tsx')

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 = () => {
-- 
cgit v1.2.3-70-g09d2

