Skip to content

Commit

Permalink
made meta_domain_ids a global variable at the top level
Browse files Browse the repository at this point in the history
  • Loading branch information
laurensvdwiel committed Sep 10, 2018
1 parent 1056f81 commit 77f6a70
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Global variables for landscape
******************************************************************************/
var selected_positions = 0;
var meta_domain_ids = new Set();

var main_outerWidth = 1300;
var main_outerHeight = 500;
Expand Down Expand Up @@ -183,13 +184,13 @@ var positionTip = d3.tip()
function resetGraph(){
// reset the variables
selected_positions = 0;
meta_domain_ids = new Set();

$("#selected_positions_information").addClass('is-hidden');
document.getElementById("selected_positions_explanation").innerHTML = 'Click on one of positions in the schematic protein to obtain more information';
$("#position_information_table").addClass('is-hidden');
d3.selectAll('.tr').remove();

selected_positions = 0;

// reset the svg
main_svg.selectAll("*").remove();
main_svg = d3.select("#landscape_svg");
Expand Down Expand Up @@ -270,7 +271,6 @@ function createGraph(obj) {

function drawMetaDomainLandscape(domain_data, data){
// get all possible domain ids
var meta_domain_ids = new Set();
for (var i = 0; i < domain_data.length; i++){
if (domain_data[i].metadomain){
meta_domain_ids.add(domain_data[i].ID);
Expand Down

0 comments on commit 77f6a70

Please sign in to comment.