mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Progressbar duration option fixed
This commit is contained in:
parent
a522291a7b
commit
2f842cedd6
@ -171,11 +171,11 @@ $(function() {
|
||||
|
||||
width: 500,
|
||||
|
||||
duration: 5000,
|
||||
duration: 1000,
|
||||
|
||||
interval: 500,
|
||||
interval: 1000,
|
||||
|
||||
increment: 300,
|
||||
increment: 1,
|
||||
|
||||
progress: function(ui) {
|
||||
//console.log(ui.pixelRange);
|
||||
|
@ -102,6 +102,10 @@ $.widget("ui.progressbar", {
|
||||
|
||||
self.active = true;
|
||||
|
||||
if (options.duration < options.interval) {
|
||||
options.duration = options.interval;
|
||||
}
|
||||
|
||||
setTimeout(
|
||||
function() {
|
||||
self.active = false;
|
||||
@ -133,11 +137,14 @@ $.widget("ui.progressbar", {
|
||||
options.interval = interval - elapsedTime;
|
||||
},
|
||||
complete: function() {
|
||||
delete jQuery.easing[self.identifier];
|
||||
self.pause();
|
||||
|
||||
if (self.active) {
|
||||
/*TODO*/
|
||||
options.interval = self._interval;
|
||||
self.bar.width(0);
|
||||
self.textElement.width(0);
|
||||
self._animate();
|
||||
}
|
||||
else {
|
||||
delete jQuery.easing[self.identifier];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -183,8 +190,8 @@ $.widget("ui.progressbar", {
|
||||
|
||||
$.ui.progressbar.defaults = {
|
||||
width: 300,
|
||||
duration: 3000,
|
||||
interval: 200,
|
||||
duration: 1000,
|
||||
interval: 1000,
|
||||
increment: 1,
|
||||
range: true,
|
||||
text: '',
|
||||
|
Loading…
Reference in New Issue
Block a user