From 49a2a694b93565f8deec18bef07d40749ce18a67 Mon Sep 17 00:00:00 2001 From: Ivan Borzenkov Date: Wed, 9 Jul 2014 21:16:16 +0400 Subject: [PATCH] add maxScrollbarLength --- src/perfect-scrollbar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/perfect-scrollbar.js b/src/perfect-scrollbar.js index 2a686f4..58bfe5c 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, @@ -156,6 +157,9 @@ if (settings.minScrollbarLength) { thumbSize = Math.max(thumbSize, settings.minScrollbarLength); } + if (settings.maxScrollbarLength) { + thumbSize = Math.min(thumbSize, settings.maxScrollbarLength); + } return thumbSize; };