Skip to content

Commit

Permalink
Adjusted dynamic scaling and layout values
Browse files Browse the repository at this point in the history
  • Loading branch information
pkraker committed May 15, 2018
1 parent 4505885 commit b161339
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions vis/js/headstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ HeadstartFSM.prototype = {
dynamicForcePapers: function(num_items) {
if (num_items >= 150 && num_items < 200) {
config.papers_force_alpha = 0.2;
} else if (num_items >= 200) {
} else if (num_items >= 200 && num_items < 350) {
config.papers_force_alpha = 0.3;
} else if (num_items >= 350 && num_items < 500) {
config.papers_force_alpha = 0.4;
}else if (num_items >= 500) {
config.papers_force_alpha = 0.6;
}
},

Expand All @@ -100,24 +104,22 @@ HeadstartFSM.prototype = {
this.adjustSizes(0.8, 1.1);
} else if (num_items >= 250 && num_items < 300) {
this.adjustSizes(0.7, 1.1);
} else if (num_items >= 250 && num_items < 300) {
this.adjustSizes(0.6, 1.1);
} else if (num_items >= 300 && num_items < 350) {
this.adjustSizes(0.5, 1.2);
this.adjustSizes(0.7, 1.2);
} else if (num_items >= 350 && num_items < 400) {
this.adjustSizes(0.4, 1.2);
this.adjustSizes(0.7, 1.2);
} else if (num_items >= 400 && num_items < 450) {
this.adjustSizes(0.3, 1.2);
this.adjustSizes(0.7, 1.2);
} else if (num_items >= 450 && num_items < 500) {
this.adjustSizes(0.2, 1.2);
this.adjustSizes(0.7, 1.2);
} else if (num_items >= 500) {
this.adjustSizes(0.1, 1.2);
this.adjustSizes(0.6, 1.2);
}
},

adjustSizes: function(resize_paper_factor, resize_bubble_factor) {
//config.papers_min_scale /= resize_paper_factor;
config.papers_max_scale /= resize_paper_factor;
config.paper_min_scale *= resize_paper_factor;
config.paper_max_scale *= resize_paper_factor;

config.bubble_min_scale *= resize_bubble_factor;
config.bubble_max_scale *= resize_bubble_factor;
Expand Down

0 comments on commit b161339

Please sign in to comment.