From ae038471f7eda76ecd985e277dda2dc6d27a3be7 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 28 Apr 2023 10:57:37 -0400
Subject: fixed open in lightbox from doc decorations.  fixed resizing text
 docs that are not fitWidth => artifact is that pdf's don't preserve aspect
 until they are resize vertically to establish a nativeHeight unless they are
 created with nativeHeight set.

---
 .../views/collections/collectionFreeForm/CollectionFreeFormView.tsx  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 719a39e8d..bab42e560 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -64,7 +64,6 @@ export type collectionFreeformViewProps = {
     noOverlay?: boolean; // used to suppress docs in the overlay (z) layer (ie, for minimap since overlay doesn't scale)
     engineProps?: any;
     getScrollHeight?: () => number | undefined;
-    dontScaleFilter?: (doc: Doc) => boolean; // whether this collection should scale documents to fit their panel vs just scrolling them
     dontRenderDocuments?: boolean; // used for annotation overlays which need to distribute documents into different freeformviews with different mixBlendModes depending on whether they are transparent or not.
     // However, this screws up interactions since only the top layer gets events.  so we render the freeformview a 3rd time with all documents in order to get interaction events (eg., marquee) but we don't actually want to display the documents.
 };
@@ -1296,7 +1295,6 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
                 dropAction={StrCast(this.props.Document.childDropAction) as dropActionType}
                 bringToFront={this.bringToFront}
                 showTitle={this.props.childShowTitle}
-                dontScaleFilter={this.props.dontScaleFilter}
                 dontRegisterView={this.props.dontRenderDocuments || this.props.dontRegisterView}
                 pointerEvents={this.pointerEvents}
                 //rotation={this.props.styleProvider?.(childLayout, this.props, StyleProp.JitterRotation) || 0}
@@ -1328,7 +1326,8 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
                 if (this.layoutDoc._isLightbox) {
                     this._lightboxDoc = doc;
                     return true;
-                } else if (this.childDocList?.includes(doc)) {
+                }
+                if (this.childDocList?.includes(doc)) {
                     if (doc.hidden) doc.hidden = false;
                     return true;
                 }
-- 
cgit v1.2.3-70-g09d2

