Skip to content

Commit ca9b736

Browse files
author
crisbeto
committed
bump the version, minify the files
1 parent 1dbb64d commit ca9b736

File tree

4 files changed

+22
-8
lines changed

4 files changed

+22
-8
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.7",
3+
"version": "0.3.8",
44
"homepage": "https://github.com/crisbeto/angular-svg-round-progressbar",
55
"authors": [
66
"crisbeto"

build/roundProgress.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* [email protected].7 2015-10-13 */
1+
/* [email protected].8 2015-10-21 */
22
// shim layer with setTimeout fallback
33
// credit Erik Möller and http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
44
'use strict';
@@ -55,6 +55,20 @@ angular.module('angular-svg-round-progress').constant('roundProgressConfig', {
5555
angular.module('angular-svg-round-progress').service('roundProgressService', [function(){
5656
var service = {};
5757
var isNumber = angular.isNumber;
58+
var base = document.head.querySelector('base');
59+
60+
// fixes issues if the document has a <base> element
61+
service.resolveColor = base && base.href ? function(value){
62+
var hashIndex = value.indexOf('#');
63+
64+
if(hashIndex > -1 && value.indexOf('url') > -1){
65+
return value.slice(0, hashIndex) + window.location.href + value.slice(hashIndex);
66+
}
67+
68+
return value;
69+
} : function(value){
70+
return value;
71+
};
5872

5973
// credits to http://modernizr.com/ for the feature test
6074
service.isSupported = !!(document.createElementNS && document.createElementNS('http://www.w3.org/2000/svg', "svg").createSVGRect);
@@ -384,7 +398,7 @@ angular.module('angular-svg-round-progress')
384398
});
385399

386400
ring.css({
387-
"stroke": options.color,
401+
"stroke": service.resolveColor(options.color),
388402
"stroke-width": stroke,
389403
"stroke-linecap": options.rounded ? "round": "butt"
390404
});
@@ -400,7 +414,7 @@ angular.module('angular-svg-round-progress')
400414
"cy": radius,
401415
"r": backgroundSize >= 0 ? backgroundSize : 0
402416
}).css({
403-
"stroke": options.bgcolor,
417+
"stroke": service.resolveColor(options.bgcolor),
404418
"stroke-width": stroke
405419
});
406420
};
@@ -484,7 +498,7 @@ angular.module('angular-svg-round-progress')
484498
'<svg class="'+ directiveName +'" xmlns="http://www.w3.org/2000/svg">',
485499
'<circle fill="none"/>',
486500
'<path fill="none"/>',
487-
'<g ng-transclude width></g>',
501+
'<g ng-transclude></g>',
488502
'</svg>'
489503
];
490504

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.7",
3+
"version": "0.3.8",
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)