##// END OF EJS Templates
Merge pull request #4384 from minrk/height...
Min RK -
r12979:52ae6bbd merge
parent child Browse files
Show More
@@ -1,5 +1,5 b''
1 //----------------------------------------------------------------------------
1 //----------------------------------------------------------------------------
2 // Copyright (C) 2008-2011 The IPython Development Team
2 // Copyright (C) 2011 The IPython Development Team
3 //
3 //
4 // Distributed under the terms of the BSD License. The full license is in
4 // Distributed under the terms of the BSD License. The full license is in
5 // the file COPYING, distributed as part of this software.
5 // the file COPYING, distributed as part of this software.
@@ -16,7 +16,6 b' var IPython = (function (IPython) {'
16 this.bind_events();
16 this.bind_events();
17 };
17 };
18
18
19
20 LayoutManager.prototype.bind_events = function () {
19 LayoutManager.prototype.bind_events = function () {
21 $(window).resize($.proxy(this.do_resize,this));
20 $(window).resize($.proxy(this.do_resize,this));
22 };
21 };
@@ -31,18 +30,17 b' var IPython = (function (IPython) {'
31 } else {
30 } else {
32 header_height = $('div#header').outerHeight(true);
31 header_height = $('div#header').outerHeight(true);
33 }
32 }
34 var menubar_height = $('div#menubar').outerHeight(true);
33 var menubar_height;
35 var toolbar_height;
34 if ($('div#menubar-container').css('display') === 'none') {
36 if ($('div#maintoolbar').css('display') === 'none') {
35 menubar_height = 0;
37 toolbar_height = 0;
38 } else {
36 } else {
39 toolbar_height = $('div#maintoolbar').outerHeight(true);
37 menubar_height = $('div#menubar-container').outerHeight(true);
40 }
38 }
41 return h-header_height-menubar_height-toolbar_height; // content height
39 return h-header_height-menubar_height; // content height
42 }
40 };
43
41
44 LayoutManager.prototype.do_resize = function () {
42 LayoutManager.prototype.do_resize = function () {
45 var app_height = this.app_height() // content height
43 var app_height = this.app_height(); // content height
46
44
47 $('#ipython-main-app').height(app_height); // content+padding+border height
45 $('#ipython-main-app').height(app_height); // content+padding+border height
48
46
General Comments 0
You need to be logged in to leave comments. Login now