Skip to content

Commit

Permalink
Fix sort
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdrickSotK committed Sep 28, 2015
1 parent e3084ce commit 178df59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/main.js
Expand Up @@ -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;
});
});
});
Expand Down

0 comments on commit 178df59

Please sign in to comment.