mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Progressbar - Source formatting
This commit is contained in:
parent
3ccc4222a8
commit
c784591d8c
@ -19,7 +19,7 @@ $.widget("ui.progressbar", {
|
|||||||
|
|
||||||
var self = this,
|
var self = this,
|
||||||
options = this.options,
|
options = this.options,
|
||||||
id = (new Date()).getTime()+Math.random(),
|
id = ((new Date()).getTime() + Math.random()),
|
||||||
text = options.text || '0%';
|
text = options.text || '0%';
|
||||||
|
|
||||||
this.element.addClass("ui-progressbar").width(options.width);
|
this.element.addClass("ui-progressbar").width(options.width);
|
||||||
@ -132,8 +132,8 @@ $.widget("ui.progressbar", {
|
|||||||
duration: interval,
|
duration: interval,
|
||||||
easing: options.equation || this.identifier,
|
easing: options.equation || this.identifier,
|
||||||
step: function(step, b) {
|
step: function(step, b) {
|
||||||
self.progress((step/options.width)*100);
|
|
||||||
var timestamp = new Date().getTime(), elapsedTime = (timestamp - b.startTime);
|
var timestamp = new Date().getTime(), elapsedTime = (timestamp - b.startTime);
|
||||||
|
self.progress( (step/options.width) * 100 );
|
||||||
options.interval = interval - elapsedTime;
|
options.interval = interval - elapsedTime;
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
@ -177,7 +177,7 @@ $.widget("ui.progressbar", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.percentState = percentState > 100 ? 100 : percentState;
|
this.percentState = percentState > 100 ? 100 : percentState;
|
||||||
this.pixelState = (this.percentState/100)*this.options.width;
|
this.pixelState = (this.percentState/100) * this.options.width;
|
||||||
this.bar.width(this.pixelState);
|
this.bar.width(this.pixelState);
|
||||||
this.textElement.width(this.pixelState);
|
this.textElement.width(this.pixelState);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user