browser: logging warning if empty rects
Change-Id: I6fa4d760d1ec8cc0dd6060aeb9d19939572c629d Signed-off-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
parent
385d3790a7
commit
626d2acd2c
1 changed files with 7 additions and 0 deletions
|
@ -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' ?
|
||||
|
|
Loading…
Reference in a new issue