kottenator / kottenator/jquery-circle-progress
Progress Bar is moving faster than percentage
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 300
- PR merge metrics
- No merged PRs in 30d
Description
For some odd reason, the progress percentage tracker is working correctly, but the progress bar is much faster. How do you slow it down to match each other by increments??
Example below:
// Current Progress Bar 1 JS
let current_progress_value = 0;
$('.second.circle').circleProgress({
fill: {color: 'blue'},
value: 0.0,
size: 150,
startAngle: -Math.PI / 2,
animationStartValue: 0,
stepValue: current_progress_value
}).on('circle-animation-progress', function (event, progress) {
$('#applicant_signature').one('keyup', function () {
$('.second.circle').circleProgress({value: current_progress_value += 0.1});
$('.second.circle').circleProgress('redraw');
$('.second.circle').circleProgress();
$('.second.circle').circleProgress({size: 150});
});
$('#applicant_signature').one('keyup', function () {
if ($('#applicant_signature').val() == '') {
$('.second.circle').circleProgress({value: current_progress_value -= 0.1});
$('.second.circle').circleProgress('redraw');
$('.second.circle').circleProgress();
$('.second.circle').circleProgress({size: 150});
}
});
$(this).find('strong').html(Math.round((current_progress_value * progress) / 20) + '<i>%</i>');
$('.second.circle').circleProgress({
fill: {color: 'blue'},
value: 0.0,
size: 150,
startAngle: -Math.PI / 2,
animationStartValue: 0,
stepValue: current_progress_value
}).on('circle-animation-end', function (event) {
if ($('.circle').circleProgress('value') === 0) {
$('.circle').circleProgress({value: 0});
$('.circle').circleProgress('redraw');
$('.circle').circleProgress();
$('.circle').circleProgress({size: 150});
}
$(this).find('strong').html(Math.round((current_progress_value * progress) / 20) + '<i>%</i>');
});
});
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior from the issue's JavaScript example with the jQuery circleProgress plugin, focusing on the repeated value updates, redraw calls, and animation callbacks. Compare the progress bar's animation with the percentage calculation and determine the expected increment behavior. Done means the bar and percentage advance together and the zero-value case still behaves correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100