diff --git a/public/assets/js/main.js b/public/assets/js/main.js index 4ad0cfe9..cc356fa7 100644 --- a/public/assets/js/main.js +++ b/public/assets/js/main.js @@ -115,4 +115,38 @@ function Main () { // Auto update menu collapsed/expanded based on the themeConfig 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 + }); + } + };