aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Bornand <nicolas74@gmail.com>2014-05-11 08:48:36 +0200
committerNicolas Bornand <nicolas74@gmail.com>2014-05-11 08:48:36 +0200
commit64b7faae30bb530b7fb4bd839735e8d4b3d6decb (patch)
tree15a9381d3a60ba69a2c9105bf120f4728c91b500
parentd4d6500ff3dd707c5bce7b162813efc273b1c3f4 (diff)
downloadplayGraph-64b7faae30bb530b7fb4bd839735e8d4b3d6decb.tar.gz
playGraph-64b7faae30bb530b7fb4bd839735e8d4b3d6decb.tar.bz2
playGraph-64b7faae30bb530b7fb4bd839735e8d4b3d6decb.zip
modify the way points are randomly chosen
-rw-r--r--app/js/services.js2
1 files changed, 1 insertions, 1 deletions
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;
}
};