Browse Source

Add SPDX license tag for peity jQuery plugin.

Also correct the license link for it in LICENSE-REDISTRIBUTED.md.
Austin S. Hemmelgarn 6 years ago
parent
commit
d4e110841b
2 changed files with 2 additions and 1 deletions
  1. 1 1
      LICENSE-REDISTRIBUTED.md
  2. 1 0
      web/lib/jquery.peity-3.2.0.min.js

+ 1 - 1
LICENSE-REDISTRIBUTED.md

@@ -46,7 +46,7 @@ connectivity is not available.
 - [Peity](http://benpickles.github.io/peity/)
 
     Copyright 2009-2015, Ben Pickles
-    [MIT License](https://github.com/benpickles/peity/blob/master/MIT-LICENCE)
+    [MIT License](https://github.com/benpickles/peity/blob/master/LICENCE)
 
 
 - [morris.js](http://morrisjs.github.io/morris.js/)

+ 1 - 0
web/lib/jquery.peity-3.2.0.min.js

@@ -4,6 +4,7 @@
 // http://benpickles.github.io/peity
 //
 // Released under MIT license.
+// SPDX-License-Identifier: MIT
 (function(k,w,h,v){var d=k.fn.peity=function(a,b){y&&this.each(function(){var e=k(this),c=e.data("_peity");c?(a&&(c.type=a),k.extend(c.opts,b)):(c=new x(e,a,k.extend({},d.defaults[a],e.data("peity"),b)),e.change(function(){c.draw()}).data("_peity",c));c.draw()});return this},x=function(a,b,e){this.$el=a;this.type=b;this.opts=e},o=x.prototype,q=o.svgElement=function(a,b){return k(w.createElementNS("http://www.w3.org/2000/svg",a)).attr(b)},y="createElementNS"in w&&q("svg",{})[0].createSVGRect;o.draw=
 function(){var a=this.opts;d.graphers[this.type].call(this,a);a.after&&a.after.call(this,a)};o.fill=function(){var a=this.opts.fill;return k.isFunction(a)?a:function(b,e){return a[e%a.length]}};o.prepare=function(a,b){this.$svg||this.$el.hide().after(this.$svg=q("svg",{"class":"peity"}));return this.$svg.empty().data("peity",this).attr({height:b,width:a})};o.values=function(){return k.map(this.$el.text().split(this.opts.delimiter),function(a){return parseFloat(a)})};d.defaults={};d.graphers={};d.register=
 function(a,b,e){this.defaults[a]=b;this.graphers[a]=e};d.register("pie",{fill:["#ff9900","#fff4dd","#ffc66e"],radius:8},function(a){if(!a.delimiter){var b=this.$el.text().match(/[^0-9\.]/);a.delimiter=b?b[0]:","}b=k.map(this.values(),function(a){return 0<a?a:0});if("/"==a.delimiter)var e=b[0],b=[e,h.max(0,b[1]-e)];for(var c=0,e=b.length,t=0;c<e;c++)t+=b[c];t||(e=2,t=1,b=[0,1]);var l=2*a.radius,l=this.prepare(a.width||l,a.height||l),c=l.width(),f=l.height(),j=c/2,d=f/2,f=h.min(j,d),a=a.innerRadius;