X-Git-Url: https://svn.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/4d5ba04bc322584f7837abf736eb9e414bfc0e44..2e2f4ddd5166f4ddc77c688040cc697f84dbfcf1:/skins/photo_film_viewer.js?ds=inline diff --git a/skins/photo_film_viewer.js b/skins/photo_film_viewer.js index 0b1fde3..b86e94d 100644 --- a/skins/photo_film_viewer.js +++ b/skins/photo_film_viewer.js @@ -146,10 +146,11 @@ FilmSlider.prototype._checkSize = function(evt) { FilmSlider.prototype._checkSizeStability = function(evt) { var self = this; var i; + var checkAgain = function(evt){self._checkSizeStability();}; for (i=0 ; i rightSize) { + for (i = this.center - rightSize - 1 ; i >= 0 ; i--) { + this.thumbnailsLoadingOrder.push(thumbnails[i]); + } + } + else if (leftSize < rightSize) { + for (i = this.center + leftSize + 1 ; i < thumbnails.length ; i++) { + this.thumbnailsLoadingOrder.push(thumbnails[i]); + } + } + var next = this.thumbnailsLoadingOrder.shift(); + var self = this; + addListener(next, 'load', function(evt){self._loadNextThumb(evt);}); + next.src = this.translateImgUrl(next.parentNode.href) + '/getThumbnail'; +}; + +FilmSlider.prototype._loadNextThumb = function(evt) { + var next = this.thumbnailsLoadingOrder.shift(); + if (!next) {return;} + var self = this; + addListener(next, 'load', function(evt){self._loadNextThumb(evt);}); + next.src = this.translateImgUrl(next.parentNode.href) + '/getThumbnail'; +}; + + FilmSlider.prototype.startSlideShow = function() { this.slideShowSlide = this.pendingSlideShowSlide = this.selectedSlide; return this.slideShowSlide.href;