mirror of https://github.com/ColorlibHQ/AdminLTE
fix height bug w/o footer
parent
ad2cdc7a56
commit
4a2a28f799
|
@ -67,7 +67,7 @@ class Layout {
|
|||
|
||||
const heights = {
|
||||
window: $(window).height(),
|
||||
header: $(SELECTOR_HEADER).length > 0 ? $(SELECTOR_HEADER).outerHeight() : 0,
|
||||
header: $(SELECTOR_HEADER).length > 0 && !$('body').hasClass('layout-navbar-fixed') ? $(SELECTOR_HEADER).outerHeight() : 0,
|
||||
footer: $(SELECTOR_FOOTER).length > 0 ? $(SELECTOR_FOOTER).outerHeight() : 0,
|
||||
sidebar: $(SELECTOR_SIDEBAR).length > 0 ? $(SELECTOR_SIDEBAR).height() : 0,
|
||||
controlSidebar
|
||||
|
@ -86,9 +86,9 @@ class Layout {
|
|||
if (max === heights.controlSidebar) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
|
||||
} else if (max === heights.window) {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - (heights.footer == 0 ? 0 : (heights.header - heights.footer)))
|
||||
} else {
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header)
|
||||
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - (heights.footer == 0 ? 0 : heights.header))
|
||||
}
|
||||
|
||||
if (this._isFooterFixed()) {
|
||||
|
|
Loading…
Reference in New Issue