Skip to content
Snippets Groups Projects
Commit 331f4c24 authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

Merge branch 'f-fix-bottomline-viewport' into dev-bmpg

parents 5b3b7c5c 5e16d05a
Branches
No related tags found
1 merge request!90F citation cff
...@@ -68,6 +68,19 @@ ...@@ -68,6 +68,19 @@
* @requires ext_table_preview (module from ext_table_preview.js) * @requires ext_table_preview (module from ext_table_preview.js)
*/ */
/**
* Helper function analogous to ext_references isOutOfViewport
*
* Check whether the bottom of an entity is within the viewport.
* Returns true when this is the case and false otherwise.
*
*/
function is_bottom_in_viewport(entity) {
var bounding = entity.getBoundingClientRect();
return bounding.bottom > 0 && bounding.bottom < (window.innerHeight ||
document.documentElement.clientHeight);
}
var ext_bottom_line = function($, logger, is_in_view_port, load_config, getEntityPath, connection, UTIF, ext_table_preview) { var ext_bottom_line = function($, logger, is_in_view_port, load_config, getEntityPath, connection, UTIF, ext_table_preview) {
/** /**
...@@ -568,7 +581,7 @@ var ext_bottom_line = function($, logger, is_in_view_port, load_config, getEntit ...@@ -568,7 +581,7 @@ var ext_bottom_line = function($, logger, is_in_view_port, load_config, getEntit
BottomLineWarning: BottomLineWarning, BottomLineWarning: BottomLineWarning,
} }
}($, log.getLogger("ext_bottom_line"), }($, log.getLogger("ext_bottom_line"),
resolve_references.is_in_viewport_vertically, load_config, getEntityPath, is_bottom_in_viewport, load_config, getEntityPath,
connection, UTIF, ext_table_preview); connection, UTIF, ext_table_preview);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment