browser: logging warning if empty rects

Change-Id: I6fa4d760d1ec8cc0dd6060aeb9d19939572c629d
Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2024-04-15 10:00:58 -04:00
parent 385d3790a7
commit 626d2acd2c

View file

@ -705,6 +705,13 @@ L.Control.PartsPreview = L.Control.extend({
var elemLeft = elemRect.left;
var elemRight = elemRect.right;
var isVisible = false;
if (!(elemRect.width > 0) || !(elemRect.height > 0))
window.app.console.warn('PREVIEW: element empty position rectangle');
if (!(window.innerWidth > 0) || !(window.innerHeight > 0))
window.app.console.warn('PREVIEW: element comparing empty window size');
// dont skip the ones that are near visible or will be visible soon while scrolling.
if (isFetching)
isVisible = this._direction === 'x' ?