Ox.Progressbar: allow for setting progress to indeterminate

This commit is contained in:
rolux 2013-10-29 14:35:00 +01:00
parent 2fc8c3094d
commit 92566171e8

View file

@ -43,7 +43,10 @@ Ox.Progressbar = function(options, self) {
cancelled: toggleCancelled,
paused: togglePaused,
progress: function() {
self.options.progress = Ox.limit(self.options.progress, 0, 1);
self.indeterminate = self.options.progress == -1;
if (self.options.progress != -1) {
self.options.progress = Ox.limit(self.options.progress, 0, 1);
}
!self.options.paused && !self.options.cancelled && setProgress(true);
}
})