Ticket #8184: periodical-updater-frequency-min.patch
| File periodical-updater-frequency-min.patch, 0.8 kB (added by zerodeux, 1 year ago) |
|---|
-
trunk/src/ajax.js
old new 342 342 this.onComplete = this.options.onComplete; 343 343 344 344 this.frequency = (this.options.frequency || 2); 345 this.frequencyMin = (this.options.frequencyMin || 0); 345 346 this.decay = (this.options.decay || 1); 346 347 347 348 this.updater = { }; … … 369 370 370 371 this.lastText = response.responseText; 371 372 } 372 this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); 373 var frequency = this.decay * this.frequency; 374 if (this.frequencyMin && period > this.frequencyMin) 375 period = this.frequencyMin; 376 this.timer = this.onTimerEvent.bind(this).delay(frequency); 373 377 }, 374 378 375 379 onTimerEvent: function() {