configure perfect scroll bar

This commit is contained in:
pramod mahajan 2025-07-16 09:50:37 +05:30
parent c18b3529b2
commit d6d98c7515

View File

@ -115,4 +115,38 @@ function Main () {
// Auto update menu collapsed/expanded based on the themeConfig // Auto update menu collapsed/expanded based on the themeConfig
window.Helpers.setCollapsed(true, false); window.Helpers.setCollapsed(true, false);
// perfect scrolling
const verticalExample = document.getElementById('vertical-example'),
horizontalExample = document.getElementById('horizontal-example'),
horizVertExample = document.getElementById('both-scrollbars-example');
// Vertical Example
// --------------------------------------------------------------------
if (verticalExample) {
new PerfectScrollbar(verticalExample, {
wheelPropagation: false
});
}
// Horizontal Example
// --------------------------------------------------------------------
if (horizontalExample) {
new PerfectScrollbar(horizontalExample, {
wheelPropagation: false,
suppressScrollY: true
});
}
// Both vertical and Horizontal Example
// --------------------------------------------------------------------
if (horizVertExample) {
new PerfectScrollbar(horizVertExample, {
wheelPropagation: false
});
}
}; };