File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ function Scroller(consoleElement) {
1313 this . jumpToBottom = true ;
1414 this . dirty = false ;
1515 this . console = consoleElement ;
16+ this . expandDistance = 200 ;
1617
1718 //pre-bind functions and throttle expansion
1819 this . refresh = this . _renderVisible . bind ( this ) ;
@@ -155,8 +156,8 @@ Scroller.prototype._onScroll = function(){
155156 const height = this . console . offsetHeight ;
156157 const scrollHeight = this . console . scrollHeight ;
157158 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 ;
160161 const nearSticky = scrollTop + height > scrollHeight - 10 ;
161162
162163 if ( this . sticky ) {
You can’t perform that action at this time.
0 commit comments