1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 08:15:22 +03:00

handle small screen resolutions more gracefully

fixes #16
This commit is contained in:
cTn 2013-12-18 14:57:27 +01:00
parent 078d305259
commit ad8304f7a8
12 changed files with 143 additions and 134 deletions

10
main.js
View file

@ -14,7 +14,15 @@ var ga_tracker = service.getTracker('UA-32728876-6');
ga_tracker.sendAppView('Application Started');
// Google Analytics stuff end
$(document).ready(function() {
$(document).ready(function() {
// set bounds (default 960x600)
if (screen.height > 600) {
chrome.app.window.current().setBounds({width: 960, height: 600});
} else {
$('div#content').height(280);
chrome.app.window.current().setBounds({width: 960, height: 400});
}
var tabs = $('#tabs > ul');
$('a', tabs).click(function() {
if ($(this).parent().hasClass('active') == false) { // only initialize when the tab isn't already active