| @@ -640,21 +640,9 @@ | ||
| 640 | 640 | * @param {number} remaining Number of media still waiting to be processed. |
| 641 | 641 | * @return {object} Object with `processed`, `total` and `percent` keys. |
| 642 | 642 | */ |
| 643 | 643 | getProgress: function ( total, remaining ) { |
| 644 | - var effectiveTotal, processed; | |
| 645 | - | |
| 646 | - total = Math.max( parseInt( total, 10 ) || 0, 0 ); | |
| 647 | - remaining = Math.max( parseInt( remaining, 10 ) || 0, 0 ); | |
| 648 | - | |
| 649 | - effectiveTotal = Math.max( total, remaining ); | |
| 650 | - processed = effectiveTotal - remaining; | |
| 651 | - | |
| 652 | - return { | |
| 653 | - processed: processed, | |
| 654 | - total: effectiveTotal, | |
| 655 | - percent: effectiveTotal > 0 ? Math.floor( processed / effectiveTotal * 100 ) : 0 | |
| 656 | - }; | |
| 644 | + return w.imagify.getProgress( total, remaining ); | |
| 657 | 645 | }, |
| 658 | 646 | |
| 659 | 647 | /** |
| 660 | 648 | * Listen for the custom event "imagifybeat-tick" on $(document). |