in AnnotationFolder, simplify crossesPoint()
This commit is contained in:
parent
959a014657
commit
cb9a5fda2d
1 changed files with 2 additions and 6 deletions
|
@ -294,13 +294,9 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function crossesPoint() {
|
function crossesPoint() {
|
||||||
var sort = [self.position, self.options.position].sort(function(a, b) {
|
var positions = [self.position, self.options.position].sort(),
|
||||||
return a - b
|
|
||||||
}),
|
|
||||||
positionA = sort[0],
|
|
||||||
positionB = sort[1];
|
|
||||||
return self.points.some(function(point) {
|
return self.points.some(function(point) {
|
||||||
return point >= positionA && point <= positionB;
|
return point >= positions[0] && point <= positions[1];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue