diff options
author | Struan Donald <struan@exo.org.uk> | 2013-08-19 16:15:56 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-08-19 16:15:56 +0100 |
commit | d84d3ce996cf62ca78e4bc77293d7db75165a5e0 (patch) | |
tree | 26fb2117160f6614c119dda48c4d35619c4e12f0 /src/js/app.js | |
parent | b2a42c371daa083d8b4445b470cf569dc0bf329a (diff) |
Do not make initial help full height
The big chunk of white space at the bottom doesn't look good
Diffstat (limited to 'src/js/app.js')
-rw-r--r-- | src/js/app.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/js/app.js b/src/js/app.js index c79aa5a..b6de327 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -143,12 +143,17 @@ var tpl = { return false; }, + setHelpHeight: function() { + var helpContent = $('#helpContent'), + viewHeight = $(window).height(); + + helpContent.height(viewHeight - 60); + }, + setupHelp: function() { var help = $('#help'), helpContent = $('#helpContent'), - viewWidth = $(window).width(), - viewHeight = $(window).height(), - helpHeight = viewHeight; + viewWidth = $(window).width(); var template; if ( !FMS.usedBefore ) { @@ -159,7 +164,9 @@ var tpl = { helpContent.html(template()); if ( !help.hasClass('android2') ) { - helpContent.height(helpHeight - 60); + if ( FMS.usedBefore ) { + FMS.setHelpHeight(); + } help.show(); } help.css('left', viewWidth); @@ -200,6 +207,9 @@ var tpl = { $('#helpContent').html(template()); FMS.usedBefore = 1; localStorage.usedBefore = 1; + if ( !$('#help').hasClass('android2') ) { + FMS.setHelpHeight(); + } } }; help.animate({left: viewWidth}, 400, 'swing', onHide ); |