allow selecting multiple annotations to get in/out range
This commit is contained in:
parent
168cdd691c
commit
96d4dfe71d
3 changed files with 65 additions and 4 deletions
|
|
@ -1350,6 +1350,14 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
if (Ox.isUndefined(data)) {
|
||||
// doubleclick on small timeline
|
||||
data = getAnnotation();
|
||||
} else if (Ox.isArray(data.id)) {
|
||||
var range = data.id.map(id => {
|
||||
return Ox.getObjectById(self.annotations, id)
|
||||
})
|
||||
data['in'] = Ox.min(range.map(annotation => { return annotation["in"]; }))
|
||||
data['out'] = Ox.max(range.map(annotation => { return annotation["out"]; }))
|
||||
setPoint('in', data['in'], true);
|
||||
setPoint('out', data.out, true);
|
||||
} else if (!data.id && Ox.$elements[that.oxid]) {
|
||||
// focus only if in the dom
|
||||
that.gainFocus();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue