Skip to content

Commit

Permalink
debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldchen committed Feb 16, 2024
1 parent 667d5b7 commit f7552b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/viewability/ViewabilityHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ class ViewabilityHelper {
const pixelsVisible =
Math.min(itemTop + itemSize, listMainSize) - Math.max(itemTop, 0);

console.log(`pikachu isItemViewable. index: ${index}, itemTop: ${itemTop}, itemSize: ${itemSize}, listMainSize: ${listMainSize}, pixelsVisible: ${pixelsVisible}. scrollOffset: ${scrollOffset}. bottomViewabilityInset: ${bottomViewabilityInset}`)

Check failure on line 143 in src/viewability/ViewabilityHelper.ts

View workflow job for this annotation

GitHub Actions / Lint Typescript

This line has a length of 248. Maximum allowed is 200

Check failure on line 143 in src/viewability/ViewabilityHelper.ts

View workflow job for this annotation

GitHub Actions / Lint Typescript

Replace ``pikachu·isItemViewable.·index:·${index},·itemTop:·${itemTop},·itemSize:·${itemSize},·listMainSize:·${listMainSize},·pixelsVisible:·${pixelsVisible}.·scrollOffset:·${scrollOffset}.·bottomViewabilityInset:·${bottomViewabilityInset}`)` with `⏎······`pikachu·isItemViewable.·index:·${index},·itemTop:·${itemTop},·itemSize:·${itemSize},·listMainSize:·${listMainSize},·pixelsVisible:·${pixelsVisible}.·scrollOffset:·${scrollOffset}.·bottomViewabilityInset:·${bottomViewabilityInset}`⏎····);`

// Always consider item fully viewable if it is fully visible, regardless of the `viewAreaCoveragePercentThreshold`
// Account for floating point imprecision.
if (Math.abs(pixelsVisible - itemSize) <= 0.001) {
Expand Down

0 comments on commit f7552b6

Please sign in to comment.