perf: reuse guide images and drag selections

This commit is contained in:
OpenClaw Agent
2026-07-09 20:44:38 +00:00
parent 50664026a1
commit e87b5d8d8f
2 changed files with 54 additions and 35 deletions

View File

@@ -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;