octate / slideshow

Automatically exported from code.google.com/p/slideshow
0 stars 0 forks source link

Random always shows the same first image #55

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Note: If this is a troubleshooting question, please first look in the FAQ 
(http://code.google.com/p/slideshow/wiki/FAQ), search in the Google Group 
(http://groups.google.com/group/mootools-slideshow) and / or post your 
question there! This form is only for technical issues / bugs, thank you.

What steps will reproduce the problem?
1. Create a slide show with images as usual
2. Set the random option
3. Reload the page, same image is always shown at the start of the slide 
show (this is the image generated by the slide show not the place holder 
one)

What is the expected output? What do you see instead?

Would expect to see a different image each time but always see the first 
image in the data list every time

What version of the product are you using? On what operating system and 
browser?

Slideshow2r113

Please provide any additional information below.

Managed to patch the code with the code below, however, not sure if 
everyone would want this as standard just be cause its what I wanted, some 
might want the first image to be the place holder one? Your call I guess! 
Anyway thought I'd raise it as a possible improvement.

Move the this.slide expression from the top of initalise to below the data 
section:

        var loaded = this.load(data);
        if (!loaded)
            return;

        this.slide = (this.options.match && match) ? match[1].toInt
() : ( this.options.random ? $random( 0, this.data.images.length - 1 ) : 
this.options.slide );

Hope that helps?

Pete

Original issue reported on code.google.com by Pete.Dun...@gmail.com on 5 Nov 2008 at 11:50

GoogleCodeExporter commented 8 years ago
Hi Pete,

I'm having the same issue. I tried using your fix, but it makes no difference 
whatsoever.

Am I missing something?

Here's my page: http://dev.ccdmd.qc.ca/monde/

Original comment by sarah.do...@gmail.com on 10 Dec 2008 at 2:13

Attachments:

GoogleCodeExporter commented 8 years ago
I checked the file you attached but it does not have the fix in it?

Attached is my patched version for you to use, if you do a diff between the to 
you 
should see the new code on line 113 or there abouts.

Hope it helps.

Original comment by Pete.Dun...@gmail.com on 22 Dec 2008 at 4:09

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by aeron.gl...@gmail.com on 27 Dec 2008 at 2:42

GoogleCodeExporter commented 8 years ago
This has been fixed in SVN - thanks for your comment!

Original comment by aeron.gl...@gmail.com on 17 Jan 2009 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by aeron.gl...@gmail.com on 17 Jan 2009 at 4:14