getdave / Protoshow

A simple slideshow for Prototype.js and script.aculo.us
http://www.protoshow.net
22 stars 19 forks source link

Incorrect handling when "controls" = false #8

Closed pingvinen closed 12 years ago

pingvinen commented 12 years ago

The updateControls throws an error stating that "down" cannot be called on nothing (in Chrome 16 on Linux).

I have changed the method to the following code which now works (at least for me).

updateControls: function(status) {
        if (this.options.controls) {
            var _this = this;
            // Role: Updates the status of the Play/Pause button        
            if (status) {           // The show has been started so update the button to "Pause"
                this.controlStartStop.down('a').update(_this.stopText);
            } else {            
                // The show has been stopped so update the button to "Play"
                this.controlStartStop.down('a').update(_this.playText);
            }
        }
    },
getdave commented 12 years ago

Hi.

Thanks for this bug report I'll add this to a hotfix asap.

getdave commented 12 years ago

Fixed in version 0.9