Fixed size of container

This commit is contained in:
Thomas FORGIONE 2015-06-19 16:21:16 +02:00
parent d80def7547
commit 3b44c4fd64
3 changed files with 45 additions and 30 deletions

23
js/prototype/main.js vendored
View File

@ -2,17 +2,22 @@ var isFullscreen = false;
var beenFullscreen = false; var beenFullscreen = false;
var main_section = document.getElementById('main-section'); var main_section = document.getElementById('main-section');
// var container_size = {
// width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;},
// height: function() {
// if (!isFullscreen)
// return main_section.clientHeight
// - document.getElementById('nav').offsetHeight
// - document.getElementById('main-div').offsetHeight;
// else
// return screen.height;
// }
// };
var container_size = { var container_size = {
width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;}, width: function() { return 1024; },
height: function() { height: function() { return 768; }
if (!isFullscreen)
return main_section.clientHeight
- document.getElementById('nav').offsetHeight
- document.getElementById('main-div').offsetHeight;
else
return screen.height;
} }
};
// Let's be sure we avoid using global variables // Let's be sure we avoid using global variables
var onWindowResize = (function() { var onWindowResize = (function() {

View File

@ -2,17 +2,22 @@ var isFullscreen = false;
var beenFullscreen = false; var beenFullscreen = false;
var main_section = document.getElementById('main-section'); var main_section = document.getElementById('main-section');
// var container_size = {
// width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;},
// height: function() {
// if (!isFullscreen)
// return main_section.clientHeight
// - document.getElementById('nav').offsetHeight
// - document.getElementById('main-div').offsetHeight;
// else
// return screen.height;
// }
// };
var container_size = { var container_size = {
width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;}, width: function() { return 1024; },
height: function() { height: function() { return 768; }
if (!isFullscreen)
return main_section.clientHeight
- document.getElementById('nav').offsetHeight
- document.getElementById('main-div').offsetHeight;
else
return screen.height;
} }
};
var onWindowResize = (function() { var onWindowResize = (function() {

View File

@ -2,17 +2,22 @@ var isFullscreen = false;
var beenFullscreen = false; var beenFullscreen = false;
var main_section = document.getElementById('main-section'); var main_section = document.getElementById('main-section');
// var container_size = {
// width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;},
// height: function() {
// if (!isFullscreen)
// return main_section.clientHeight
// - document.getElementById('nav').offsetHeight
// - document.getElementById('main-div').offsetHeight;
// else
// return screen.height;
// }
// };
var container_size = { var container_size = {
width: function() { if (!isFullscreen) return main_section.clientWidth; else return screen.width;}, width: function() { return 1024; },
height: function() { height: function() { return 768; }
if (!isFullscreen)
return main_section.clientHeight
- document.getElementById('nav').offsetHeight
- document.getElementById('main-div').offsetHeight;
else
return screen.height;
} }
};
// Let's be sure we avoid using global variables // Let's be sure we avoid using global variables
var onWindowResize = (function() { var onWindowResize = (function() {