M2vH / galleriffic

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

Disable slideshow if only one image #83

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
By simply adding a check to the play function to ensure there is more than 
one image, you can disable the annoying fade to / from the same image.

    play: function() {
         if (imageCounter == 1) return false;
             ...

This is useful in user-generated slideshows that only contain one image, 
perhaps a rare case but i encountered it today.

Original issue reported on code.google.com by thingsNs...@gmail.com on 23 Jan 2010 at 6:11

GoogleCodeExporter commented 8 years ago
I did the same thing, so I agree this should be fixed in the next release.  I 
modified it slightly differently:

            ssAdvance: function() {
                if (this.isSlideshowRunning && (this.data.length > 1))
                    this.next(true);

                return this;
            },

Original comment by kenk...@gmail.com on 9 Jul 2010 at 1:35

GoogleCodeExporter commented 8 years ago
It would be good when suggesting fixes to say which file you're modifying, and 
line number. Thanks

Original comment by victoria...@pmactree.com on 15 Jul 2010 at 4:48

GoogleCodeExporter commented 8 years ago
Good idea, this would be really useful to me. Thanks

Original comment by ad...@catalystwebsites.co.uk on 17 Mar 2011 at 12:43