Roo.ux.Slideshow = function(cfg )
{
Roo.apply(this, cfg);
- if ( !this.slides) {
-
- this.numOfImages = this.slides.length;
- if ( !this.numOfImages ) {
- // alert('No slides?');
- }
+ if ( !this.slides || !this.slides.length) {
+ return;
}
if (this.slides.length == 1) {
this.slides[0].setVisibilityMode(Roo.Element.DISPLAY);
this.pauseButton && this.pauseButton.show();
this.updatecounter();
+ this.slides[0].setStyle({ opacity : 1.0 });
+ this.slides[0].show();
this.play.defer(this.wait, this);
},
this.iImageId++;
}
- this.textIn = this.iImageId+1 + ' of ' + this.numOfImages;
+ this.textIn = this.iImageId+1 + ' of ' + this.slides.length;
this.updatecounter();
if (this.running) {
if (!this.counter) {
return;
}
- var textIn = this.iImageId+1 + ' of ' + this.numOfImages;
+ var textIn = this.iImageId+1 + ' of ' + this.slides.length;
this.counter.update( textIn );
var oNewCaption = this.slides[this.iImageId].select('.image-caption', true);
if ( this.caption && oNewCaption.length ) {