Comparing version 0.2.0 to 1.0.0
@@ -1,2 +0,2 @@ | ||
// https://d3js.org/d3-path/ Version 0.2.0. Copyright 2016 Mike Bostock. | ||
// https://d3js.org/d3-path/ Version 1.0.0. Copyright 2016 Mike Bostock. | ||
(function (global, factory) { | ||
@@ -3,0 +3,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
@@ -1,2 +0,2 @@ | ||
// https://d3js.org/d3-path/ Version 0.2.0. Copyright 2016 Mike Bostock. | ||
// https://d3js.org/d3-path/ Version 1.0.0. Copyright 2016 Mike Bostock. | ||
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports):"function"==typeof define&&define.amd?define(["exports"],s):s(t.d3=t.d3||{})}(this,function(t){"use strict";function s(){this._x0=this._y0=this._x1=this._y1=null,this._=[]}function i(){return new s}var h=Math.PI,_=2*h,n=1e-6,e=_-n;s.prototype=i.prototype={constructor:s,moveTo:function(t,s){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+s)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._.push("Z"))},lineTo:function(t,s){this._.push("L",this._x1=+t,",",this._y1=+s)},quadraticCurveTo:function(t,s,i,h){this._.push("Q",+t,",",+s,",",this._x1=+i,",",this._y1=+h)},bezierCurveTo:function(t,s,i,h,_,n){this._.push("C",+t,",",+s,",",+i,",",+h,",",this._x1=+_,",",this._y1=+n)},arcTo:function(t,s,i,_,e){t=+t,s=+s,i=+i,_=+_,e=+e;var o=this._x1,u=this._y1,r=i-t,a=_-s,c=o-t,f=u-s,p=c*c+f*f;if(0>e)throw new Error("negative radius: "+e);if(null===this._x1)this._.push("M",this._x1=t,",",this._y1=s);else if(p>n)if(Math.abs(f*r-a*c)>n&&e){var x=i-o,y=_-u,M=r*r+a*a,l=x*x+y*y,d=Math.sqrt(M),v=Math.sqrt(p),b=e*Math.tan((h-Math.acos((M+p-l)/(2*d*v)))/2),w=b/v,T=b/d;Math.abs(w-1)>n&&this._.push("L",t+w*c,",",s+w*f),this._.push("A",e,",",e,",0,0,",+(f*x>c*y),",",this._x1=t+T*r,",",this._y1=s+T*a)}else this._.push("L",this._x1=t,",",this._y1=s);else;},arc:function(t,s,i,o,u,r){t=+t,s=+s,i=+i;var a=i*Math.cos(o),c=i*Math.sin(o),f=t+a,p=s+c,x=1^r,y=r?o-u:u-o;if(0>i)throw new Error("negative radius: "+i);null===this._x1?this._.push("M",f,",",p):(Math.abs(this._x1-f)>n||Math.abs(this._y1-p)>n)&&this._.push("L",f,",",p),i&&(y>e?this._.push("A",i,",",i,",0,1,",x,",",t-a,",",s-c,"A",i,",",i,",0,1,",x,",",this._x1=f,",",this._y1=p):(0>y&&(y=y%_+_),this._.push("A",i,",",i,",0,",+(y>=h),",",x,",",this._x1=t+i*Math.cos(u),",",this._y1=s+i*Math.sin(u))))},rect:function(t,s,i,h){this._.push("M",this._x0=this._x1=+t,",",this._y0=this._y1=+s,"h",+i,"v",+h,"h",-i,"Z")},toString:function(){return this._.join("")}},t.path=i,Object.defineProperty(t,"__esModule",{value:!0})}); |
{ | ||
"name": "d3-path", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "Serialize Canvas path commands to SVG.", | ||
"keywords": [ | ||
"d3", | ||
"d3-module", | ||
"canvas", | ||
@@ -31,3 +32,3 @@ "path", | ||
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-path.js -c -m -o build/d3-path.min.js", | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-path.js ../d3.github.com/d3-path.v0.3.js && cp build/d3-path.min.js ../d3.github.com/d3-path.v0.3.min.js && cd ../d3.github.com && git add d3-path.v0.3.js d3-path.v0.3.min.js && git commit -m \"d3-path ${VERSION}\" && git push && cd - && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-path.js ../d3.github.com/d3-path.v1.js && cp build/d3-path.min.js ../d3.github.com/d3-path.v1.min.js && cd ../d3.github.com && git add d3-path.v1.js d3-path.v1.min.js && git commit -m \"d3-path ${VERSION}\" && git push && cd - && zip -j build/d3-path.zip -- LICENSE README.md build/d3-path.js build/d3-path.min.js" | ||
}, | ||
@@ -37,3 +38,3 @@ "devDependencies": { | ||
"package-preamble": "0.0", | ||
"rollup": "0.27", | ||
"rollup": "0.31", | ||
"tape": "4", | ||
@@ -40,0 +41,0 @@ "uglify-js": "2" |
@@ -24,6 +24,6 @@ # d3-path | ||
If you use NPM, `npm install d3-path`. Otherwise, download the [latest release](https://github.com/d3/d3-path/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-path.v0.2.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: | ||
If you use NPM, `npm install d3-path`. Otherwise, download the [latest release](https://github.com/d3/d3-path/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-path.v1.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: | ||
```html | ||
<script src="https://d3js.org/d3-path.v0.2.min.js"></script> | ||
<script src="https://d3js.org/d3-path.v1.min.js"></script> | ||
<script> | ||
@@ -30,0 +30,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
20341
0