File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ function Scroller(consoleElement) {
13
13
this . jumpToBottom = true ;
14
14
this . dirty = false ;
15
15
this . console = consoleElement ;
16
+ this . expandDistance = 200 ;
16
17
17
18
//pre-bind functions and throttle expansion
18
19
this . refresh = this . _renderVisible . bind ( this ) ;
@@ -155,8 +156,8 @@ Scroller.prototype._onScroll = function(){
155
156
const height = this . console . offsetHeight ;
156
157
const scrollHeight = this . console . scrollHeight ;
157
158
const scrollTop = this . console . scrollTop ;
158
- const nearTop = scrollTop < 100 ;
159
- const nearBottom = scrollTop + height > scrollHeight - 100 ;
159
+ const nearTop = scrollTop < this . expandDistance ;
160
+ const nearBottom = scrollTop + height > scrollHeight - this . expandDistance ;
160
161
const nearSticky = scrollTop + height > scrollHeight - 10 ;
161
162
162
163
if ( this . sticky ) {
You can’t perform that action at this time.
0 commit comments