fix: Ensure that AggregateKeyframes don't get recreated when dragging

Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
This commit is contained in:
Cole Lawrence 2022-05-30 08:52:34 -04:00
parent 243e77efe8
commit f222cc61dd

View file

@ -79,7 +79,9 @@ function AggregatedKeyframeTrack_memo(props: IAggregatedKeyframeTracksProps) {
layoutP={layoutP}
viewModel={viewModel}
aggregateKeyframes={posKfs}
key={'agg-' + position}
// To ensure that while dragging, we don't lose reference to the
// aggregate we're trying to drag.
key={'agg-' + keyframes[0].kf.id}
selection={
selectedPositions.has(position) === true ? selection : undefined
}