fixed #308
This commit is contained in:
parent
56300ab2db
commit
2d0607aebd
1 changed files with 12 additions and 12 deletions
|
@ -169,7 +169,7 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
// FIXME: should be select, not selectplace
|
// FIXME: should be select, not selectplace
|
||||||
selectplace: function(data) {
|
selectplace: function(data) {
|
||||||
if (!data.id && self.options.selected && Ox.getObjectById(self.options.items, self.options.selected).place.defined) {
|
if (!data.id && self.options.selected && Ox.getObjectById(self.options.items, self.options.selected).place) {
|
||||||
// only deselect annotation if the place deselect was not
|
// only deselect annotation if the place deselect was not
|
||||||
// caused by switching to an annotation without place
|
// caused by switching to an annotation without place
|
||||||
self.$annotations.options({selected: ''});
|
self.$annotations.options({selected: ''});
|
||||||
|
@ -268,7 +268,7 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
positionA = sort[0],
|
positionA = sort[0],
|
||||||
positionB = sort[1];
|
positionB = sort[1];
|
||||||
return self.points.some(function(point) {
|
return self.points.some(function(point) {
|
||||||
return point > positionA && point < positionB;
|
return point >= positionA && point <= positionB;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,8 +309,8 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
(
|
(
|
||||||
self.options.range == 'all' || (
|
self.options.range == 'all' || (
|
||||||
self.options.range == 'selection'
|
self.options.range == 'selection'
|
||||||
&& item['in'] < self.options.out
|
&& item['in'] <= self.options.out
|
||||||
&& item.out > self.options['in']
|
&& item.out >= self.options['in']
|
||||||
) || (
|
) || (
|
||||||
self.options.range == 'position'
|
self.options.range == 'position'
|
||||||
&& item['in'] <= self.options.position
|
&& item['in'] <= self.options.position
|
||||||
|
@ -324,14 +324,6 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPoints() {
|
|
||||||
return Ox.unique(Ox.flatten(
|
|
||||||
self.options.items.map(function(item) {
|
|
||||||
return [item['in'], item.out];
|
|
||||||
})
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
function getEvents() {
|
function getEvents() {
|
||||||
var events = [];
|
var events = [];
|
||||||
self.annotations.filter(function(item) {
|
self.annotations.filter(function(item) {
|
||||||
|
@ -366,6 +358,14 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
return places;
|
return places;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPoints() {
|
||||||
|
return Ox.unique(Ox.flatten(
|
||||||
|
self.options.items.map(function(item) {
|
||||||
|
return [item['in'], item.out];
|
||||||
|
})
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
function getSort() {
|
function getSort() {
|
||||||
return ({
|
return ({
|
||||||
duration: ['-duration', '+in', '+value'],
|
duration: ['-duration', '+in', '+value'],
|
||||||
|
|
Loading…
Reference in a new issue