From cb9a5fda2dfe0d02bac4fc5aacde4f8d1ed77007 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 10 May 2012 12:12:34 +0200 Subject: [PATCH] in AnnotationFolder, simplify crossesPoint() --- source/Ox.UI/js/Video/Ox.AnnotationFolder.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js index 71519443..57d4565d 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js @@ -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]; }); }