Skip to content

Commit add1678

Browse files
committed
bump the version, build the files
1 parent 39f7a3f commit add1678

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-svg-round-progressbar",
3-
"version": "0.3.9",
3+
"version": "0.3.10",
44
"homepage": "https://github.com/crisbeto/angular-svg-round-progressbar",
55
"authors": [
66
"crisbeto"

build/roundProgress.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* [email protected].9 2015-12-27 */
1+
/* [email protected].10 2016-01-23 */
22
// shim layer with setTimeout fallback
33
// credit Erik Möller and http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
44
'use strict';
@@ -331,6 +331,7 @@ angular.module('angular-svg-round-progress')
331331
rounded: "=",
332332
clockwise: "=",
333333
responsive: "=",
334+
onRender: "=",
334335
radius: "@",
335336
color: "@",
336337
bgcolor: "@",
@@ -441,20 +442,23 @@ angular.module('angular-svg-round-progress')
441442
// stops some expensive animating if the value is above the max or under 0
442443
if(preventAnimation){
443444
service.updateState(end, max, circleSize, ring, elementSize, isSemicircle);
445+
446+
if(options.onRender){
447+
options.onRender(end, options, element);
448+
}
444449
}else{
445450
var startTime = new $window.Date();
446451
var id = ++lastAnimationId;
447452

448453
(function animation(){
449454
var currentTime = $window.Math.min(new Date() - startTime, duration);
455+
var animateTo = easingAnimation(currentTime, start, changeInValue, duration);
456+
457+
service.updateState(animateTo, max, circleSize, ring, elementSize, isSemicircle);
450458

451-
service.updateState(
452-
easingAnimation(currentTime, start, changeInValue, duration),
453-
max,
454-
circleSize,
455-
ring,
456-
elementSize,
457-
isSemicircle);
459+
if(options.onRender){
460+
options.onRender(animateTo, options, element);
461+
}
458462

459463
if(id === lastAnimationId && currentTime < duration){
460464
$window.requestAnimationFrame(animation);
@@ -499,7 +503,7 @@ angular.module('angular-svg-round-progress')
499503

500504
// properties that are used during animation. some of these overlap with
501505
// the ones that are used for presentation
502-
scope.$watchGroup(['current', 'max', 'animation', 'duration', 'radius', 'stroke', 'semi', 'offset'], function(newValue, oldValue){
506+
scope.$watchGroup(['current', 'max', 'radius', 'stroke', 'semi', 'offset'], function(newValue, oldValue){
503507
renderState(service.toNumber(newValue[0]), service.toNumber(oldValue[0]));
504508
});
505509
},

build/roundProgress.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-svg-round-progressbar",
3-
"version": "0.3.9",
3+
"version": "0.3.10",
44
"description": "AngularJS module that uses SVG to create a circular progressar",
55
"main": "build/roundProgress.min.js",
66
"scripts": {},

0 commit comments

Comments
 (0)