Skip to content

Commit

Permalink
Remove consideration for 30 px bottom bar
Browse files Browse the repository at this point in the history
  • Loading branch information
bhamrick committed Aug 6, 2016
1 parent 5160b78 commit 838debe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions multitwitch/static/js/multitwitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ function optimize_size(n) {
var num_rows = Math.ceil(n / per_row);
var max_width = Math.floor(width / per_row) - 4;
var max_height = Math.floor(height / num_rows) - 4;
if (max_width * 9/16 + 30 < max_height) {
max_height = max_width * 9/16 + 30;
if (max_width * 9/16 < max_height) {
max_height = max_width * 9/16;
} else {
max_width = (max_height - 30) * 16/9;
max_width = (max_height) * 16/9;
}
if (max_width > best_width) {
best_width = max_width;
Expand Down

0 comments on commit 838debe

Please sign in to comment.