From 64b7faae30bb530b7fb4bd839735e8d4b3d6decb Mon Sep 17 00:00:00 2001 From: Nicolas Bornand Date: Sun, 11 May 2014 08:48:36 +0200 Subject: modify the way points are randomly chosen --- app/js/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/services.js b/app/js/services.js index 622717a..b661da7 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -42,7 +42,7 @@ app.service('pathService', function() { selection.push(removed[0]); duration -= 10; } - selection.sort(function(item){ return item.closestIndex;}); + selection.sort(function(a,b){ return a.closestIndex-b.closestIndex;}); return selection; } }; -- cgit v1.2.3