perf: reuse guide images and drag selections
This commit is contained in:
@@ -8188,29 +8188,29 @@ class TimelineEditor {
|
||||
}
|
||||
return s;
|
||||
}),
|
||||
motion: this._multiDragInitialSegments.motion.map(s => {
|
||||
if (selectedIds.includes(s.id)) {
|
||||
return { ...s, start: s.start + clampedDragDelta };
|
||||
}
|
||||
return s;
|
||||
}),
|
||||
audio: this._multiDragInitialSegments.audio.map(s => {
|
||||
if (selectedIds.includes(s.id)) {
|
||||
return { ...s, start: s.start + clampedDragDelta };
|
||||
}
|
||||
return s;
|
||||
})
|
||||
};
|
||||
motion: this._multiDragInitialSegments.motion.map(s => {
|
||||
if (selectedIdSet.has(s.id)) {
|
||||
return { ...s, start: s.start + clampedDragDelta };
|
||||
}
|
||||
return s;
|
||||
}),
|
||||
audio: this._multiDragInitialSegments.audio.map(s => {
|
||||
if (selectedIdSet.has(s.id)) {
|
||||
return { ...s, start: s.start + clampedDragDelta };
|
||||
}
|
||||
return s;
|
||||
})
|
||||
};
|
||||
|
||||
// Scrub support for video segments being moved
|
||||
for (const track of ["image", "motion"]) {
|
||||
const prevSegs = this._multiDragPreviewTimelines[track];
|
||||
for (const s of prevSegs) {
|
||||
if (selectedIds.includes(s.id) && (s.type === "video" || s.type === "motion_video")) {
|
||||
this._liveScrubVideo(s, "start");
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const track of ["image", "motion"]) {
|
||||
const prevSegs = this._multiDragPreviewTimelines[track];
|
||||
for (const s of prevSegs) {
|
||||
if (selectedIdSet.has(s.id) && (s.type === "video" || s.type === "motion_video")) {
|
||||
this._liveScrubVideo(s, "start");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.render();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user