@@ -383,15 +383,15 @@ const get_relative_position = (el, reference_el = document.body) => {
383383 // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect
384384 const left = Math . abs (
385385 el . getBoundingClientRect ( ) . left +
386- reference_el . scrollLeft -
387- reference_el . getBoundingClientRect ( ) . left -
388- dom . get_css_value ( reference_el , "border-left-width" , true )
386+ reference_el . scrollLeft -
387+ reference_el . getBoundingClientRect ( ) . left -
388+ dom . get_css_value ( reference_el , "border-left-width" , true )
389389 ) ;
390390 const top = Math . abs (
391391 el . getBoundingClientRect ( ) . top +
392- reference_el . scrollTop -
393- reference_el . getBoundingClientRect ( ) . top -
394- dom . get_css_value ( reference_el , "border-top-width" , true )
392+ reference_el . scrollTop -
393+ reference_el . getBoundingClientRect ( ) . top -
394+ dom . get_css_value ( reference_el , "border-top-width" , true )
395395 ) ;
396396
397397 return { top, left } ;
@@ -535,9 +535,9 @@ const get_visible_ratio = (el, container) => {
535535 container !== window
536536 ? container . getBoundingClientRect ( )
537537 : {
538- top : 0 ,
539- bottom : window . innerHeight ,
540- } ;
538+ top : 0 ,
539+ bottom : window . innerHeight ,
540+ } ;
541541
542542 let visible_ratio = 0 ;
543543 if ( rect . top < container_rect . bottom && rect . bottom > container_rect . top ) {
0 commit comments