summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Coldrick <adam@sotk.co.uk>2015-09-28 19:10:01 (GMT)
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2015-09-28 19:51:54 (GMT)
commit682ddc153d082a9df7b0c765816b5fd93dc59f3b (patch)
treea5d6fa81ed0b7ddf70174c7e7648f2e1b4272918
parent9171b1b810254054992e370ab3fd82b2fe9138e9 (diff)
downloadciat-ui-master.tar.gz
Fix sortHEADmaster
-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;
});
});
});