in AnnotationFolder, simplify crossesPoint()

This commit is contained in:
rolux 2012-05-10 12:12:34 +02:00
parent 959a014657
commit cb9a5fda2d

View file

@ -294,13 +294,9 @@ Ox.AnnotationFolder = function(options, self) {
}
function crossesPoint() {
var sort = [self.position, self.options.position].sort(function(a, b) {
return a - b
}),
positionA = sort[0],
positionB = sort[1];
var positions = [self.position, self.options.position].sort(),
return self.points.some(function(point) {
return point >= positionA && point <= positionB;
return point >= positions[0] && point <= positions[1];
});
}