aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-10 14:03:06 -0500
committerbobzel <zzzman@gmail.com>2023-11-10 14:03:06 -0500
commitd460d2ec856c9fc13789e151c9738f3345e95b64 (patch)
treef430f6eb35fcafe1a2508e58cf0c3687a33dc88a /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
parent77d9a3dc6341e10a579d6f3bede380236bd3af5e (diff)
cleanup. fix color setting/interpolation for freeform animated views.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx11
1 files changed, 2 insertions, 9 deletions
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();