Changeset - 1637a36dfe65
[Not reviewed]
0 1 0
Brett Smith (brett) - 7 years ago 2016-11-29 18:45:44
brett@sfconservancy.org
js: Fix math again.

I misunderstood how multiprogressbar works. Values aren't expected to
progressively grow larger; it takes care of the summing itself.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/js/supporter-page.js
Show inline comments
...
 
@@ -49,14 +49,13 @@ $(document).ready(function() {
 
    $('#siteprogressbar').empty();
 

	
 
    if (noCommaSiteSoFar >= noCommaSiteMiddleGoal) {
 
        // We've got
 
        var leftOver = noCommaMatchFinalGoal - noCommaSiteSoFar;
 
        var supporterProgress = (noCommaSiteSoFar / noCommaSiteFinalGoal) * 100;
 
        var matchProgress = (noCommaSiteMatchCount / noCommaSiteFinalGoal) * 100;
 
        var needProgress = supporterProgress + (100 - matchProgress);
 
        var needProgress = (leftOver / noCommaSiteFinalGoal) * 100;
 

	
 
        $('#siteprogressbar').
 
            multiprogressbar({ parts: [
 
                { value: supporterProgress,
 
                  text: noCommaSiteSoFar.toLocaleString() + " have joined!",
 
                  barClass: "progress", textClass: "soFarText" },
0 comments (0 inline, 0 general)