File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 5151 distance = scrollTop;
5252 } else {
5353 let scrollElmHeight;
54- let elOffsetTopFromScrollElm;
54+ let elOffsetTopFromScrollElm = this . $el . getBoundingClientRect (). top ;
5555
5656 if (elm === window ) {
5757 scrollElmHeight = window .innerHeight ;
58- elOffsetTopFromScrollElm = this .$el .getBoundingClientRect ().top ;
5958 } else {
6059 scrollElmHeight = elm .getBoundingClientRect ().height ;
61- elOffsetTopFromScrollElm = this .$el .getBoundingClientRect ().top -
62- elm .getBoundingClientRect ().top ;
60+ elOffsetTopFromScrollElm -= elm .getBoundingClientRect ().top ;
6361 }
6462
65- distance = elOffsetTopFromScrollElm - scrollTop - scrollElmHeight - (elm .offsetTop || 0 );
63+ distance = elOffsetTopFromScrollElm - scrollElmHeight - (elm .offsetTop || 0 );
6664 }
6765 return distance;
6866 }
You can’t perform that action at this time.
0 commit comments