sidebar upgradeed (#3159)

Removed Unnecessary Code
And
Sidebar improved (Can work smothly without overlayscroll plugin)
This commit is contained in:
Daniel
2020-11-27 13:51:15 +05:30
committed by GitHub
parent b835bb678b
commit 48ceaed751
3 changed files with 5 additions and 7 deletions

View File

@@ -32,7 +32,6 @@ 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',
@@ -84,11 +83,7 @@ class Layout {
if (offset !== false) {
if (max === heights.controlSidebar) {
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))
}
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset))
} else if (max === heights.window) {
$contentSelector.css(this._config.panelAutoHeightMode, (max + offset) - heights.header - heights.footer)
} else {
@@ -121,6 +116,8 @@ class Layout {
clickScrolling: true
}
})
} else {
$(SELECTOR_SIDEBAR).css('overflow-y', 'auto')
}
}