Closed jackchoon closed 7 years ago
Thanks for considering and suggestion. I will make an improvement on it. Do you think a 'percentage' is acceptable when update ?
ProgressBar.update( percent )
Sounds like, if there is a single argument in update()
then it will be percent based. If two arguments then it will revert to.update(currentValue, maxValue)
@nathanpeck @jackchoon
This functionality is now available in v0.3.6
.update(currentValue, maxValue)
and .update(percent)
Thanks for providing this. However, I can not merge this in as is because it completely removes the ability to update the max value dynamically.
In some workloads the total amount of work can not be accurately determined in advance, and it is necessary to update the max value on the fly, allowing the progress bar to skip ahead or move backwards as the workload is either expanded or decreased.
I think an acceptable solution would be to allow the user to setup a predefined max value on the constructor if they wish and then optionally leave out the max value when calling
ProgressBar.update()
, but also retain the ability to change the max value in theProgressBar.update()
method if needed. If you update your pull request with this change I will definitely merge it in.Thanks!