fix getClip

This commit is contained in:
j 2024-02-16 10:18:12 +00:00
parent 85c4917fa7
commit f139ab79e2

View file

@ -95,8 +95,11 @@ function getClip(edit, position) {
let pos = 0 let pos = 0
edit.clips.forEach(function(clip) { edit.clips.forEach(function(clip) {
if (clip.position < position && clip.position + clip.duration > position) { if (clip.position < position && clip.position + clip.duration > position) {
response.item = clip.id response.item = clip.item
response.position = position - clip.position response.position = position - clip.position
if (clip['in']) {
response.position += clip['in']
}
} }
}); });
return response return response