fix coderabbit issues
This commit is contained in:
parent
cb8f003478
commit
6226ceb052
|
|
@ -272,7 +272,7 @@ export class TimelineManager {
|
|||
propertyPath,
|
||||
time,
|
||||
value,
|
||||
interpolation = "linear",
|
||||
interpolation,
|
||||
keyframeId,
|
||||
}) =>
|
||||
new UpsertKeyframeCommand({
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export function getKeyframeAtTime({
|
|||
const channel = animations?.channels[propertyPath];
|
||||
if (!channel || channel.keyframes.length === 0) return null;
|
||||
const keyframe = channel.keyframes.find(
|
||||
(kf) => Math.abs(kf.time - time) <= TIME_EPSILON_SECONDS,
|
||||
(keyframe) => Math.abs(keyframe.time - time) <= TIME_EPSILON_SECONDS,
|
||||
);
|
||||
if (!keyframe) return null;
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ export class MoveElementCommand extends Command {
|
|||
|
||||
const isSameTrack = this.sourceTrackId === this.targetTrackId;
|
||||
|
||||
let updatedTracks = tracksToUpdate.map((track) => {
|
||||
let updatedTracks = tracksToUpdate.map((track): TimelineTrack => {
|
||||
if (isSameTrack && track.id === this.sourceTrackId) {
|
||||
return {
|
||||
...track,
|
||||
|
|
@ -124,8 +124,8 @@ export class MoveElementCommand extends Command {
|
|||
};
|
||||
}
|
||||
|
||||
return track;
|
||||
}) as TimelineTrack[];
|
||||
return track;
|
||||
});
|
||||
|
||||
if (!isSameTrack) {
|
||||
const sourceTrackAfterMove = updatedTracks.find(
|
||||
|
|
|
|||
Loading…
Reference in New Issue