Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout size bug fixed #3146

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion build/js/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const CLASS_NAME_SIDEBAR_FOCUSED = 'sidebar-focused'
const CLASS_NAME_LAYOUT_FIXED = 'layout-fixed'
const CLASS_NAME_CONTROL_SIDEBAR_SLIDE_OPEN = 'control-sidebar-slide-open'
const CLASS_NAME_CONTROL_SIDEBAR_OPEN = 'control-sidebar-open'
const CLASS_NAME_LAYOUT_TOP_NAV = 'layout-top-nav'

const Default = {
scrollbarTheme: 'os-theme-light',
Expand Down Expand Up @@ -82,7 +83,11 @@ class Layout {

if (offset !== false) {
if (max === heights.controlSidebar) {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
if ($body.hasClass(CLASS_NAME_LAYOUT_TOP_NAV)) {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) + heights.header + heights.footer)
} else {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
}
} else if (max === heights.window) {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
} else {
Expand Down Expand Up @@ -164,6 +169,10 @@ class Layout {
this.fixLayoutHeight()
})

$(document).ready(() => {
this.fixLayoutHeight()
})

setTimeout(() => {
$('body.hold-transition').removeClass('hold-transition')
}, 50)
Expand Down