Skip to content

Commit

Permalink
more drawer sizing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Feb 15, 2016
1 parent b6ffa22 commit ee5b199
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/client/browser-utils.js
Expand Up @@ -85,19 +85,20 @@ function init ($) {
lastOpenedDrawer = id;
if (prepare) { prepare(); }

var top = 0;
var style = {display:'block', right: '0'};

var windowWidth = $(window).width();
if (windowWidth < SMALL_SCREEN || ($(window).height() < SMALL_SCREEN) && windowWidth < 800) {
style.width = windowWidth + 'px';
top = $("#chartContainer").offset().top - 45;
var top = $("#chartContainer").offset().top - 45;
style.top = top + 'px';
style.height = ($(window).height() - top - 45) + 'px';
} else {
style.top = '0px';
style.height = ($(window).height() - 45) + 'px';
style.width = '350px';
}

style.top = top;
style.height = ($(window).height() - top) + 'px';

$(id).css(style);
});
Expand Down

0 comments on commit ee5b199

Please sign in to comment.