Fixed size of container
This commit is contained in:
parent
d80def7547
commit
3b44c4fd64
|
@ -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() {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue