Internet Archive BookReader

Comment 5 for bug 581964

mangtronix (mang) wrote :

Another one:
// loadLeafs()
//______________________________________________________________________________
BookReader.prototype.loadLeafs = function() {

    var self = this;
    if (null == this.timer) {
        this.timer=setTimeout(function(){self.drawLeafs()},250);
    } else {
        clearTimeout(this.timer);
        this.timer=setTimeout(function(){self.drawLeafs()},250);
    }
}