mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
fix coderabbit issues
This commit is contained in:
@@ -272,7 +272,7 @@ export class TimelineManager {
|
|||||||
propertyPath,
|
propertyPath,
|
||||||
time,
|
time,
|
||||||
value,
|
value,
|
||||||
interpolation = "linear",
|
interpolation,
|
||||||
keyframeId,
|
keyframeId,
|
||||||
}) =>
|
}) =>
|
||||||
new UpsertKeyframeCommand({
|
new UpsertKeyframeCommand({
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export function getKeyframeAtTime({
|
|||||||
const channel = animations?.channels[propertyPath];
|
const channel = animations?.channels[propertyPath];
|
||||||
if (!channel || channel.keyframes.length === 0) return null;
|
if (!channel || channel.keyframes.length === 0) return null;
|
||||||
const keyframe = channel.keyframes.find(
|
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;
|
if (!keyframe) return null;
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export class MoveElementCommand extends Command {
|
|||||||
|
|
||||||
const isSameTrack = this.sourceTrackId === this.targetTrackId;
|
const isSameTrack = this.sourceTrackId === this.targetTrackId;
|
||||||
|
|
||||||
let updatedTracks = tracksToUpdate.map((track) => {
|
let updatedTracks = tracksToUpdate.map((track): TimelineTrack => {
|
||||||
if (isSameTrack && track.id === this.sourceTrackId) {
|
if (isSameTrack && track.id === this.sourceTrackId) {
|
||||||
return {
|
return {
|
||||||
...track,
|
...track,
|
||||||
@@ -124,8 +124,8 @@ export class MoveElementCommand extends Command {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return track;
|
return track;
|
||||||
}) as TimelineTrack[];
|
});
|
||||||
|
|
||||||
if (!isSameTrack) {
|
if (!isSameTrack) {
|
||||||
const sourceTrackAfterMove = updatedTracks.find(
|
const sourceTrackAfterMove = updatedTracks.find(
|
||||||
|
|||||||
Reference in New Issue
Block a user