From d460d2ec856c9fc13789e151c9738f3345e95b64 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 10 Nov 2023 14:03:06 -0500
Subject: cleanup.  fix color setting/interpolation for freeform animated
 views.

---
 .../collections/collectionFreeForm/CollectionFreeFormView.tsx | 11 ++---------
 1 file changed, 2 insertions(+), 9 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 ce1aa87af..27c3eaa93 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -35,6 +35,7 @@ import { COLLECTION_BORDER_WIDTH } from '../../../views/global/globalCssVariable
 import { Timeline } from '../../animationtimeline/Timeline';
 import { ContextMenu } from '../../ContextMenu';
 import { GestureOverlay } from '../../GestureOverlay';
+import { CtrlKey } from '../../GlobalKeyHandler';
 import { ActiveArrowEnd, ActiveArrowStart, ActiveDash, ActiveFillColor, ActiveInkBezierApprox, ActiveInkColor, ActiveInkWidth, ActiveIsInkMask, InkingStroke, SetActiveInkColor, SetActiveInkWidth } from '../../InkingStroke';
 import { LightboxView } from '../../LightboxView';
 import { CollectionFreeFormDocumentView } from '../../nodes/CollectionFreeFormDocumentView';
@@ -52,7 +53,6 @@ import { CollectionFreeFormRemoteCursors } from './CollectionFreeFormRemoteCurso
 import './CollectionFreeFormView.scss';
 import { MarqueeView } from './MarqueeView';
 import React = require('react');
-import { CtrlKey } from '../../GlobalKeyHandler';
 
 export type collectionFreeformViewProps = {
     NativeWidth?: () => number;
@@ -1422,7 +1422,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
             x: Number.isNaN(NumCast(x)) ? 0 : NumCast(x),
             y: Number.isNaN(NumCast(y)) ? 0 : NumCast(y),
             z: Cast(z, 'number'),
-            rotation: rotation,
+            rotation,
             color: Cast(color, 'string') ? StrCast(color) : this.props.styleProvider?.(childDoc, this.props, StyleProp.Color),
             backgroundColor: Cast(backgroundColor, 'string') ? StrCast(backgroundColor) : this.getClusterColor(childDoc, this.props, StyleProp.BackgroundColor),
             opacity: !_width ? 0 : this._keyframeEditing ? 1 : Cast(opacity, 'number') ?? this.props.styleProvider?.(childDoc, this.props, StyleProp.Opacity),
@@ -1558,13 +1558,6 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
                 this._layoutSizeData.set(entry[0], { width: newPos.width, height: newPos.height });
             }
         }
-        // by returning undefined, we prevent an edit being made to layoutElements when nothing has happened
-        // this short circuit, prevents lots of downstream mobx invalidations which would have no effect but cause
-        // a distinct lag at the start of dragging.
-        // The reason we're here in the first place without a change is that when dragging a document,
-        // filters are changed on the annotation layers (eg. WebBox) which invalidate the childDoc list
-        // for the overlay views -- however, in many cases, this filter change doesn't actually affect anything
-        // (e.g, no annotations, or only opaque annotations).
         this._cachedPool.clear();
         Array.from(newPool.entries()).forEach(k => this._cachedPool.set(k[0], k[1]));
         const elements = computedElementData.slice();
-- 
cgit v1.2.3-70-g09d2

