diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index e1311d5..46ecb15 100644 --- a/src/perfect-scrollbar.js +++ b/src/perfect-scrollbar.js @@ -22,6 +22,7 @@ wheelSpeed: 10, wheelPropagation: false, minScrollbarLength: null, + maxScrollbarLength: null, useBothWheelAxes: false, useKeyboard: true, suppressScrollX: false, @@ -158,6 +159,9 @@ if (settings.minScrollbarLength) { thumbSize = Math.max(thumbSize, settings.minScrollbarLength); } + if (settings.maxScrollbarLength) { + thumbSize = Math.min(thumbSize, settings.maxScrollbarLength); + } return thumbSize; };