Permalink
Browse files

order ANI_ group samples, when sample organization changes

  • Loading branch information...
ozcan committed May 23, 2018
1 parent d56253a commit aa007cf902dea2de4bd63524cd49f0566cf2511d
Showing with 9 additions and 0 deletions.
  1. +9 −0 anvio/data/interactive/js/sample.js
@@ -68,9 +68,18 @@ $(document).ready(function() {
for(var i=0; i < new_order.length; i++)
{
// sort main layers with new order.
var layer_id = getLayerId(new_order[i]);
var detached_row = $('#height' + layer_id).closest('tr').detach();
$('#tbody_layers').append(detached_row);
// sort sample layers with new order, but only if they are member of a group starting with "ANI_"
for (let group in samples_information_dict) {
if (group.startsWith('ANI_')) {
let detached_sample_row = $(`tr[samples-group-name='${group}'][samples-layer-name='${new_order[i]}']`);
$('#tbody_samples').prepend(detached_sample_row);
}
}
}
});
});

0 comments on commit aa007cf

Please sign in to comment.