Skip to content

Progress Bar is moving faster than percentage #201

Description

@RailsCod3rFuture

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>');
        });
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions