From 22376ded1271629974bfafc31b77e3288d593c3d Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 2 Oct 2024 12:24:11 -0400
Subject: added showTags button for cardView.  fixed unnecessary invalidations
 of TagsView based on child screenToLocal changing when its not rendered.

---
 src/client/views/collections/CollectionCardDeckView.tsx | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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

diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx
index e5a6ebc7f..101cc8082 100644
--- a/src/client/views/collections/CollectionCardDeckView.tsx
+++ b/src/client/views/collections/CollectionCardDeckView.tsx
@@ -1,4 +1,4 @@
-import { IReactionDisposer, ObservableMap, action, computed, makeObservable, observable, reaction, trace } from 'mobx';
+import { IReactionDisposer, ObservableMap, action, computed, makeObservable, observable, reaction } from 'mobx';
 import { observer } from 'mobx-react';
 import * as React from 'react';
 import { ClientUtils, DashColor, returnFalse, returnZero } from '../../../ClientUtils';
@@ -139,7 +139,7 @@ export class CollectionCardView extends CollectionSubView() {
      * custom group
      */
     @computed get childDocsWithoutLinks() {
-        return this.childDocs.filter(l => l.type !== DocumentType.LINK);
+        return this.childDocs.filter(l => !l.layout_isSvg);
     }
 
     /**
@@ -402,7 +402,7 @@ export class CollectionCardView extends CollectionSubView() {
             PanelHeight={this.childPanelHeight}
             dontCenter="y" // Don't center it vertically, because the grid it's in is already doing that and we don't want to do it twice.
             dragAction={(this.Document.childDragAction ?? this._props.childDragAction) as dropActionType}
-            showTags={true}
+            showTags={BoolCast(this.layoutDoc.showChildTags)}
             dontHideOnDrag
         />
     );
@@ -607,6 +607,8 @@ export class CollectionCardView extends CollectionSubView() {
 
                 const dref = this._docRefs.get(doc);
                 const { translateX, translateY, scale } = ClientUtils.GetScreenTransform(dref?.ContentDiv);
+                if (!scale) return new Transform(0, 0, 0);
+
                 return new Transform(-translateX + (dref?.centeringX || 0) * scale, 
                                      -translateY + (dref?.centeringY || 0) * scale, 1)
                           .scale(1 / scale).rotate(!isSelected ? -this.rotate(amCards, calcRowIndex) : 0); // prettier-ignore
@@ -639,7 +641,7 @@ export class CollectionCardView extends CollectionSubView() {
                                     SnappingManager.SetIsResizing(undefined);
                                     this._forceChildXf++;
                                 }),
-                                600
+                                1000
                             );
                         }
                     })}
-- 
cgit v1.2.3-70-g09d2

