mirror of https://github.com/zulip/zulip.git
Reduce repeated height calculations in get_new_heights.
(imported from commit bc5422519d048d6be6bc53e16bd1597d704c1ff5)
This commit is contained in:
parent
ea582d4e12
commit
a1cea767fe
|
@ -267,23 +267,19 @@ function need_skinny_mode() {
|
|||
|
||||
function get_new_heights() {
|
||||
var res = {};
|
||||
var viewport_height = viewport.height();
|
||||
var top_navbar_height = $("#top_navbar").height();
|
||||
|
||||
res.bottom_whitespace_height =
|
||||
viewport.height() * 0.4;
|
||||
res.bottom_whitespace_height = viewport_height * 0.4;
|
||||
|
||||
res.main_div_min_height =
|
||||
viewport.height()
|
||||
- $("#top_navbar").height();
|
||||
res.main_div_min_height = viewport_height - top_navbar_height;
|
||||
|
||||
res.bottom_sidebar_height =
|
||||
viewport.height()
|
||||
- $("#top_navbar").height()
|
||||
res.bottom_sidebar_height = viewport_height - top_navbar_height
|
||||
- $(".upper_sidebar").height()
|
||||
- 40;
|
||||
|
||||
res.right_sidebar_height =
|
||||
viewport.height()
|
||||
- $("#top_navbar").height()
|
||||
viewport_height - top_navbar_height
|
||||
- $("#notifications-area").height()
|
||||
- 14 // margin for right sidebar
|
||||
- 10; // padding on notifications bar
|
||||
|
|
Loading…
Reference in New Issue