X-Git-Url: https://scm.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/e0660307a6fa16a363722bcf06f74bb9f53e1d30..1a28edcbf9b0c46fbab9bcc9fff0b065349f8f24:/skins/photo_lightbox_viewer.js?ds=sidebyside diff --git a/skins/photo_lightbox_viewer.js b/skins/photo_lightbox_viewer.js index cf39a0a..c649dc2 100644 --- a/skins/photo_lightbox_viewer.js +++ b/skins/photo_lightbox_viewer.js @@ -14,25 +14,17 @@ var reSelected = /.*selected.*/; Lightbox = function(grid, toolbar, complete) { var self = this; this.grid = grid; - this.slides = []; - var node, i; - for (i=0 ; i this.lastSlide.firstElementChild.offsetTop - getWindowHeight()) { + getWindowScrollY() > + (this.lastSlide.firstElementChild || this.lastSlide.children[0]).offsetTop + - getWindowHeight()) { this.fetchingDisabled = true; this.fetchTail(); } @@ -255,7 +261,7 @@ Lightbox.prototype.deleteSelection = function() { }; Lightbox.prototype._removeSelection = function() { - var i, e, slide; + var i, e; var toRemove = []; for (i=0 ; i