Skip to content
This repository

Use offsetWidth to check for hidden or disconnected preload nodes, since... #129

Merged
merged 1 commit into from over 2 years ago

2 participants

Kris Zyp SitePenKenFranqueiro
Kris Zyp
Collaborator

... it is more correct (properly handles hidden nodes) and doesn't throw errors.

Kris Zyp kriszyp Use offsetWidth to check for hidden or disconnected preload nodes, si…
…nce it is more correct (properly handles hidden nodes) and doesn't throw errors.
b463731
SitePenKenFranqueiro SitePenKenFranqueiro merged commit 5b53c9e into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 16, 2012
Kris Zyp kriszyp Use offsetWidth to check for hidden or disconnected preload nodes, si…
…nce it is more correct (properly handles hidden nodes) and doesn't throw errors.
b463731
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 OnDemandList.js
4 OnDemandList.js
@@ -256,12 +256,12 @@ return declare([List, _StoreMixin], {
256 256 // the preload is below the line of sight
257 257 do{
258 258 preload = preload.previous;
259   - }while(preload && !preload.node.offsetParent); // skip past preloads that are not currently connected
  259 + }while(preload && !preload.node.offsetWidth); // skip past preloads that are not currently connected
260 260 }else if(visibleTop - mungeAmount > (preloadTop + (preloadHeight = preloadNode.offsetHeight))){
261 261 // the preload is above the line of sight
262 262 do{
263 263 preload = preload.next;
264   - }while(preload && !preload.node.offsetParent);// skip past preloads that are not currently connected
  264 + }while(preload && !preload.node.offsetWidth);// skip past preloads that are not currently connected
265 265 }else{
266 266 // the preload node is visible, or close to visible, better show it
267 267 var offset = ((preloadNode.rowIndex ? visibleTop : visibleBottom) - preloadTop) / grid.rowHeight;

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.