Skip to content

Commit

Permalink
Sort names before printing.
Browse files Browse the repository at this point in the history
  • Loading branch information
sligocki committed Jun 12, 2021
1 parent 7ea0cba commit e3d0229
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/circles.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ worker.onmessage = function(e) {
e_summary.textContent = "Circle " + response.circle_num + " / Size " + response.circle_nodes.length + " / Cumulative " + response.cumulative_size + " / " + time_diff + " total seconds elapsed";
e_new.appendChild(e_summary);

console.log("Circle " + response.circle_num + " :")
console.log(response.circle_nodes)
// Sort by ID.
response.circle_nodes.sort(function(a, b) {
if (a.id > b.id) { return 1; }
else if (a.id < b.id) { return -1;}
else { return 0; }
})
let e_list = document.createElement("ul");
e_list.style.display = "none";
for (let node of response.circle_nodes) {
Expand Down

0 comments on commit e3d0229

Please sign in to comment.