From 97bc8fb32741051554509eeaf9d223b327ebd611 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 7 Feb 2024 00:02:36 -0500
Subject: switch to xAnchor to clean up link lines.   added transition to
 getBounds() so that LinkBox can follow animated transitions.  added
 dataTransitions for stacking view.  fixed presBox to be able to clear
 transition timers when a new slide transition is chosen.

---
 src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

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

diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index 0ae4ed62c..a0a64ab59 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -33,7 +33,6 @@ export interface CollectionFreeFormDocumentViewWrapperProps extends DocumentView
     opacity?: number;
     highlight?: boolean;
     transition?: string;
-    dataTransition?: string;
     RenderCutoffProvider: (doc: Doc) => boolean;
     CollectionFreeFormView: CollectionFreeFormView;
 }
@@ -56,7 +55,6 @@ export class CollectionFreeFormDocumentViewWrapper extends ObservableReactCompon
     @observable Height = this.props.height;
     @observable AutoDim = this.props.autoDim;
     @observable Transition = this.props.transition;
-    @observable DataTransition = this.props.dataTransition;
     CollectionFreeFormView = this.props.CollectionFreeFormView; // needed for type checking
     RenderCutoffProvider = this.props.RenderCutoffProvider; // needed for type checking
 
@@ -83,7 +81,6 @@ export class CollectionFreeFormDocumentViewWrapper extends ObservableReactCompon
     w_Height = ()          => this.Height; // prettier-ignore
     w_AutoDim = ()         => this.AutoDim; // prettier-ignore
     w_Transition = ()      => this.Transition; // prettier-ignore
-    w_DataTransition = ()  => this.DataTransition; // prettier-ignore
 
     PanelWidth = ()        => this._props.autoDim ? this._props.PanelWidth?.() : this.Width; // prettier-ignore
     PanelHeight = ()       => this._props.autoDim ? this._props.PanelHeight?.() : this.Height; // prettier-ignore
@@ -117,7 +114,6 @@ export interface CollectionFreeFormDocumentViewProps extends DocumentViewProps {
     w_Transition: () => string | undefined;
     w_Width: () => number;
     w_Height: () => number;
-    w_DataTransition: () => string | undefined;
     PanelWidth: () => number;
     PanelHeight: () => number;
     RenderCutoffProvider: (doc: Doc) => boolean;
@@ -288,14 +284,21 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
                     width: this._props.PanelWidth(),
                     height: this._props.PanelHeight(),
                     transform: `translate(${this._props.w_X()}px, ${this._props.w_Y()}px) rotate(${NumCast(this._props.w_Rotation?.())}deg)`,
-                    transition: this._props.w_Transition?.() ?? (this._props.w_DataTransition?.() || this._props.w_Transition?.()),
+                    transition: this._props.w_Transition?.() || StrCast(this.Document.dataTransition),
                     zIndex: this._props.w_ZIndex?.(),
                     display: this._props.w_Width?.() ? undefined : 'none',
                 }}>
                 {this._props.RenderCutoffProvider(this.Document) ? (
                     <div style={{ position: 'absolute', width: this._props.PanelWidth(), height: this._props.PanelHeight(), background: 'lightGreen' }} />
                 ) : (
-                    <DocumentView {...passOnProps} CollectionFreeFormDocumentView={this.returnThis} styleProvider={this.styleProvider} ScreenToLocalTransform={this.screenToLocalTransform} isGroupActive={this.isGroupActive} />
+                    <DocumentView
+                        {...passOnProps}
+                        DataTransition={this._props.w_Transition}
+                        CollectionFreeFormDocumentView={this.returnThis}
+                        styleProvider={this.styleProvider}
+                        ScreenToLocalTransform={this.screenToLocalTransform}
+                        isGroupActive={this.isGroupActive}
+                    />
                 )}
             </div>
         );
-- 
cgit v1.2.3-70-g09d2

