I'm having some trouble with the Client ProgressBar regarding the interval.
When I use the showcase example with an 1s interval and an increment of 10 [pbClient.setValue(pbClient.getValue() + 10);] everything runs fine and the bar runs for 10s as expected.
However, if I change the interval to 0.1s and the increment to 1 [pbClient.setValue(pbClient.getValue() + 1);] it runs far longer than 10 seconds. at least 40 or 50 seconds.
It seems like there's a minimum animation time between each step that cannot be undershot.
Anybody know hot to fix this?
Smallest interval/increment for Client ProgressBar
I have a similar problem, I'm using to show the progress of a download, but just the download is a little fast and progressbar delay to update the progress, the result is that when the download is complete the progress still came in half.
This is why they are using animation to update progress, this animation is 500ms, so each progress update takes all this time.
I think the ideal solution would be to create an attribute to allow changing the delay of the animation.
Now:
Ideal:
This is why they are using animation to update progress, this animation is 500ms, so each progress update takes all this time.
I think the ideal solution would be to create an attribute to allow changing the delay of the animation.
Now:
Code: Select all
setValue: function(value) {
if(value >= 0 && value<=100) {
if(value == 0) {
this.jqValue.hide().css('width', '0%').removeClass('ui-corner-right');
this.jqLabel.hide();
}
else {
this.jqValue.show().animate({
'width': value + '%'
}, 500, 'easeInOutCirc');
if(this.cfg.labelTemplate) {
var formattedLabel = this.cfg.labelTemplate.replace(/{value}/gi, value);
this.jqLabel.html(formattedLabel).show();
}
}
this.value = value;
this.jq.attr('aria-valuenow', value);
}
},
Ideal:
Code: Select all
setValue: function(value) {
if(value >= 0 && value<=100) {
if(value == 0) {
this.jqValue.hide().css('width', '0%').removeClass('ui-corner-right');
this.jqLabel.hide();
}
else {
if (this.cfg.animationDelay > 0) {
this.jqValue.show().animate({
'width': value + '%'
}, this.cfg.animationDelay, 'easeInOutCirc');
} else {
// allow disable animation
this.jqValue.show().css('width', value + '%');
}
if(this.cfg.labelTemplate) {
var formattedLabel = this.cfg.labelTemplate.replace(/{value}/gi, value);
this.jqLabel.html(formattedLabel).show();
}
}
this.value = value;
this.jq.attr('aria-valuenow', value);
}
},
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
I have to ask this, why are you duplicating something browsers already offer?
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
-
- Information
-
Who is online
Users browsing this forum: No registered users and 41 guests