1
0

Fix for broken slideshow, fixes #6

This commit is contained in:
Fredrik Erlandsson 2012-01-08 14:05:54 +01:00
parent 0bdd3c68b1
commit e0fcc41fc0

View File

@ -324,7 +324,7 @@ function togglePlayPause() {
if (slideShow === null) { if (slideShow === null) {
$('#play_detail').hide(); $('#play_detail').hide();
$('#pause_detail').show(); $('#pause_detail').show();
slideShow = setTimeout("slideShowUpdate(" + (slideShowId + 1) + ")", 1000); slideShow = setTimeout("slideShowUpdate()", 5000);
} else { //We are playing } else { //We are playing
$('#pause_detail').hide(); $('#pause_detail').hide();
$('#play_detail').show(); $('#play_detail').show();
@ -340,16 +340,17 @@ function startSlideshow() {
$('#detailView').fadeIn('slow'); $('#detailView').fadeIn('slow');
hideHoverV = setTimeout("hideHoverView()", 3000); hideHoverV = setTimeout("hideHoverView()", 3000);
slideShowId = currentImg; slideShowId = currentImg;
slideShowId = 0; swatchImg(slideShowId);
togglePlayPause(); togglePlayPause();
} }
function slideShowUpdate(id) { function slideShowUpdate() {
if (id > slideshowImages.length) { slideShowId = slideShowId + 1;
id = 0; if (slideShowId > slideshowImages.length) {
slideShowId = 0;
} }
swatchImg(id); swatchImg(slideShowId);
slideShow = setTimeout("slideShowUpdate(" + id + 1 + ")", 5000); slideShow = setTimeout("slideShowUpdate()", 5000);
} }
function switchMode(mode) { function switchMode(mode) {