summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/main.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/main.js b/js/main.js
index a31c5f0..f1451ff 100644
--- a/js/main.js
+++ b/js/main.js
@@ -44,7 +44,9 @@ app.controller('VisualisationController', function($scope, $http, $q, $interval)
data: value
});
$scope.steps.sort(function(a, b) {
- return a.name.charAt(0) > b.name.charAt(0);
+ var left = parseInt(a.name.split('.', 1));
+ var right = parseInt(b.name.split('.', 1));
+ return left - right;
});
});
});