Skip to content
Permalink
Browse files
Fix sort
  • Loading branch information
ColdrickSotK committed Sep 28, 2015
1 parent e3084ce commit 178df59d37a1db0bb31615ba266c27b258f7c52f
Showing with 3 additions and 1 deletion.
  1. +3 −1 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;
});
});
});

0 comments on commit 178df59

Please sign in to comment.