joeblack9988 / slideshow

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

Enhancement: new method to know current slide #166

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

It would be great to be able to retrieve easily the current slide number, and 
why not picture associated data.

For example (this code has been partially copied from slideShow sources, from 
go method):
getCurrentSlide: function() {
  return (this.slide - 1 + this.data.images.length) % this.data.images.length;
}

Slideshow is really great :)

Thank you.

David

Original issue reported on code.google.com by d.duquen...@gmail.com on 22 Feb 2011 at 3:43

GoogleCodeExporter commented 8 years ago

Original comment by aeron.gl...@gmail.com on 17 Mar 2011 at 8:52

GoogleCodeExporter commented 8 years ago
This has been fixed in the new version (to be posted later today). The "slide" 
property of the slideshow instance now correctly reflects the current slide. So:

var show = new Slideshow( ... );
console.log(show.slide); // logs current slide #

Will update the docs.

Original comment by aeron.gl...@gmail.com on 10 Apr 2011 at 11:00