Comparing version 2.1.0 to 3.0.0
@@ -1,2 +0,2 @@ | ||
// https://d3js.org/d3-shape/ v2.1.0 Copyright 2021 Mike Bostock | ||
// https://d3js.org/d3-shape/ v3.0.0 Copyright 2021 Mike Bostock | ||
(function (global, factory) { | ||
@@ -323,3 +323,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-path')) : | ||
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; | ||
case 1: this._point = 2; // proceed | ||
case 1: this._point = 2; // falls through | ||
default: this._context.lineTo(x, y); break; | ||
@@ -923,3 +923,3 @@ } | ||
switch (this._point) { | ||
case 3: point$3(this, this._x1, this._y1); // proceed | ||
case 3: point$3(this, this._x1, this._y1); // falls through | ||
case 2: this._context.lineTo(this._x1, this._y1); break; | ||
@@ -935,3 +935,3 @@ } | ||
case 1: this._point = 2; break; | ||
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed | ||
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through | ||
default: point$3(this, x, y); break; | ||
@@ -1024,3 +1024,3 @@ } | ||
case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; | ||
case 3: this._point = 4; // proceed | ||
case 3: this._point = 4; // falls through | ||
default: point$3(this, x, y); break; | ||
@@ -1064,3 +1064,3 @@ } | ||
} | ||
case 1: this._point = 2; // proceed | ||
case 1: this._point = 2; // falls through | ||
default: { | ||
@@ -1180,3 +1180,3 @@ if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y); | ||
case 1: this._point = 2; this._x1 = x, this._y1 = y; break; | ||
case 2: this._point = 3; // proceed | ||
case 2: this._point = 3; // falls through | ||
default: point$2(this, x, y); break; | ||
@@ -1288,3 +1288,3 @@ } | ||
case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; | ||
case 3: this._point = 4; // proceed | ||
case 3: this._point = 4; // falls through | ||
default: point$2(this, x, y); break; | ||
@@ -1372,3 +1372,3 @@ } | ||
case 1: this._point = 2; break; | ||
case 2: this._point = 3; // proceed | ||
case 2: this._point = 3; // falls through | ||
default: point$1(this, x, y); break; | ||
@@ -1504,3 +1504,3 @@ } | ||
case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; | ||
case 3: this._point = 4; // proceed | ||
case 3: this._point = 4; // falls through | ||
default: point$1(this, x, y); break; | ||
@@ -1749,3 +1749,3 @@ } | ||
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; | ||
case 1: this._point = 2; // proceed | ||
case 1: this._point = 2; // falls through | ||
default: { | ||
@@ -1752,0 +1752,0 @@ if (this._t <= 0) { |
@@ -1,2 +0,2 @@ | ||
// https://d3js.org/d3-shape/ v2.1.0 Copyright 2021 Mike Bostock | ||
// https://d3js.org/d3-shape/ v3.0.0 Copyright 2021 Mike Bostock | ||
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports,require("d3-path")):"function"==typeof define&&define.amd?define(["exports","d3-path"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{},t.d3)}(this,(function(t,i){"use strict";function n(t){return function(){return t}}var e=Math.abs,s=Math.atan2,o=Math.cos,h=Math.max,_=Math.min,r=Math.sin,a=Math.sqrt,c=1e-12,l=Math.PI,u=l/2,f=2*l;function y(t){return t>1?0:t<-1?l:Math.acos(t)}function x(t){return t>=1?u:t<=-1?-u:Math.asin(t)}function p(t){return t.innerRadius}function v(t){return t.outerRadius}function d(t){return t.startAngle}function T(t){return t.endAngle}function g(t){return t&&t.padAngle}function b(t,i,n,e,s,o,h,_){var r=n-t,a=e-i,l=h-s,u=_-o,f=u*r-l*a;if(!(f*f<c))return[t+(f=(l*(i-o)-u*(t-s))/f)*r,i+f*a]}function m(t,i,n,e,s,o,_){var r=t-n,c=i-e,l=(_?o:-o)/a(r*r+c*c),u=l*c,f=-l*r,y=t+u,x=i+f,p=n+u,v=e+f,d=(y+p)/2,T=(x+v)/2,g=p-y,b=v-x,m=g*g+b*b,w=s-o,k=y*v-p*x,N=(b<0?-1:1)*a(h(0,w*w*m-k*k)),M=(k*b-g*N)/m,S=(-k*g-b*N)/m,E=(k*b+g*N)/m,A=(-k*g+b*N)/m,P=M-d,C=S-T,O=E-d,R=A-T;return P*P+C*C>O*O+R*R&&(M=E,S=A),{cx:M,cy:S,x01:-u,y01:-f,x11:M*(s/w-1),y11:S*(s/w-1)}}var w=Array.prototype.slice;function k(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function N(t){this._context=t}function M(t){return new N(t)}function S(t){return t[0]}function E(t){return t[1]}function A(t,e){var s=n(!0),o=null,h=M,_=null;function r(n){var r,a,c,l=(n=k(n)).length,u=!1;for(null==o&&(_=h(c=i.path())),r=0;r<=l;++r)!(r<l&&s(a=n[r],r,n))===u&&((u=!u)?_.lineStart():_.lineEnd()),u&&_.point(+t(a,r,n),+e(a,r,n));if(c)return _=null,c+""||null}return t="function"==typeof t?t:void 0===t?S:n(t),e="function"==typeof e?e:void 0===e?E:n(e),r.x=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),r):e},r.defined=function(t){return arguments.length?(s="function"==typeof t?t:n(!!t),r):s},r.curve=function(t){return arguments.length?(h=t,null!=o&&(_=h(o)),r):h},r.context=function(t){return arguments.length?(null==t?o=_=null:_=h(o=t),r):o},r}function P(t,e,s){var o=null,h=n(!0),_=null,r=M,a=null;function c(n){var c,l,u,f,y,x=(n=k(n)).length,p=!1,v=new Array(x),d=new Array(x);for(null==_&&(a=r(y=i.path())),c=0;c<=x;++c){if(!(c<x&&h(f=n[c],c,n))===p)if(p=!p)l=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),u=c-1;u>=l;--u)a.point(v[u],d[u]);a.lineEnd(),a.areaEnd()}p&&(v[c]=+t(f,c,n),d[c]=+e(f,c,n),a.point(o?+o(f,c,n):v[c],s?+s(f,c,n):d[c]))}if(y)return a=null,y+""||null}function l(){return A().defined(h).curve(r).context(_)}return t="function"==typeof t?t:void 0===t?S:n(+t),e="function"==typeof e?e:n(void 0===e?0:+e),s="function"==typeof s?s:void 0===s?E:n(+s),c.x=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),o=null,c):t},c.x0=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),c):t},c.x1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:n(+t),c):o},c.y=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),s=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),c):e},c.y1=function(t){return arguments.length?(s=null==t?null:"function"==typeof t?t:n(+t),c):s},c.lineX0=c.lineY0=function(){return l().x(t).y(e)},c.lineY1=function(){return l().x(t).y(s)},c.lineX1=function(){return l().x(o).y(e)},c.defined=function(t){return arguments.length?(h="function"==typeof t?t:n(!!t),c):h},c.curve=function(t){return arguments.length?(r=t,null!=_&&(a=r(_)),c):r},c.context=function(t){return arguments.length?(null==t?_=a=null:a=r(_=t),c):_},c}function C(t,i){return i<t?-1:i>t?1:i>=t?0:NaN}function O(t){return t}N.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}};var R=z(M);function q(t){this._curve=t}function z(t){function i(i){return new q(t(i))}return i._curve=t,i}function X(t){var i=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?i(z(t)):i()._curve},t}function Y(){return X(A().curve(R))}function B(){var t=P().curve(R),i=t.curve,n=t.lineX0,e=t.lineX1,s=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return X(n())},delete t.lineX0,t.lineEndAngle=function(){return X(e())},delete t.lineX1,t.lineInnerRadius=function(){return X(s())},delete t.lineY0,t.lineOuterRadius=function(){return X(o())},delete t.lineY1,t.curve=function(t){return arguments.length?i(z(t)):i()._curve},t}function j(t,i){return[(i=+i)*Math.cos(t-=Math.PI/2),i*Math.sin(t)]}function I(t){return t.source}function D(t){return t.target}function L(t){var e=I,s=D,o=S,h=E,_=null;function r(){var n,r=w.call(arguments),a=e.apply(this,r),c=s.apply(this,r);if(_||(_=n=i.path()),t(_,+o.apply(this,(r[0]=a,r)),+h.apply(this,r),+o.apply(this,(r[0]=c,r)),+h.apply(this,r)),n)return _=null,n+""||null}return r.source=function(t){return arguments.length?(e=t,r):e},r.target=function(t){return arguments.length?(s=t,r):s},r.x=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),r):o},r.y=function(t){return arguments.length?(h="function"==typeof t?t:n(+t),r):h},r.context=function(t){return arguments.length?(_=null==t?null:t,r):_},r}function V(t,i,n,e,s){t.moveTo(i,n),t.bezierCurveTo(i=(i+e)/2,n,i,s,e,s)}function W(t,i,n,e,s){t.moveTo(i,n),t.bezierCurveTo(i,n=(n+s)/2,e,n,e,s)}function H(t,i,n,e,s){var o=j(i,n),h=j(i,n=(n+s)/2),_=j(e,n),r=j(e,s);t.moveTo(o[0],o[1]),t.bezierCurveTo(h[0],h[1],_[0],_[1],r[0],r[1])}q.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,i){this._curve.point(i*Math.sin(t),i*-Math.cos(t))}};var F={draw:function(t,i){var n=Math.sqrt(i/l);t.moveTo(n,0),t.arc(0,0,n,0,f)}},G={draw:function(t,i){var n=Math.sqrt(i/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},J=Math.sqrt(1/3),K=2*J,Q={draw:function(t,i){var n=Math.sqrt(i/K),e=n*J;t.moveTo(0,-n),t.lineTo(e,0),t.lineTo(0,n),t.lineTo(-e,0),t.closePath()}},U=Math.sin(l/10)/Math.sin(7*l/10),Z=Math.sin(f/10)*U,$=-Math.cos(f/10)*U,tt={draw:function(t,i){var n=Math.sqrt(.8908130915292852*i),e=Z*n,s=$*n;t.moveTo(0,-n),t.lineTo(e,s);for(var o=1;o<5;++o){var h=f*o/5,_=Math.cos(h),r=Math.sin(h);t.lineTo(r*n,-_*n),t.lineTo(_*e-r*s,r*e+_*s)}t.closePath()}},it={draw:function(t,i){var n=Math.sqrt(i),e=-n/2;t.rect(e,e,n,n)}},nt=Math.sqrt(3),et={draw:function(t,i){var n=-Math.sqrt(i/(3*nt));t.moveTo(0,2*n),t.lineTo(-nt*n,-n),t.lineTo(nt*n,-n),t.closePath()}},st=-.5,ot=Math.sqrt(3)/2,ht=1/Math.sqrt(12),_t=3*(ht/2+1),rt={draw:function(t,i){var n=Math.sqrt(i/_t),e=n/2,s=n*ht,o=e,h=n*ht+n,_=-o,r=h;t.moveTo(e,s),t.lineTo(o,h),t.lineTo(_,r),t.lineTo(st*e-ot*s,ot*e+st*s),t.lineTo(st*o-ot*h,ot*o+st*h),t.lineTo(st*_-ot*r,ot*_+st*r),t.lineTo(st*e+ot*s,st*s-ot*e),t.lineTo(st*o+ot*h,st*h-ot*o),t.lineTo(st*_+ot*r,st*r-ot*_),t.closePath()}},at=[F,G,Q,it,tt,et,rt];function ct(){}function lt(t,i,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+n)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function yt(t){this._context=t}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:lt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:lt(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},ft.prototype={areaStart:ct,areaEnd:ct,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:lt(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(n,e):this._context.moveTo(n,e);break;case 3:this._point=4;default:lt(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}};class xt{constructor(t,i){this._context=t,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,i,t,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,t,this._y0,t,i)}this._x0=t,this._y0=i}}function pt(t,i){this._basis=new ut(t),this._beta=i}pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,n=t.length-1;if(n>0)for(var e,s=t[0],o=i[0],h=t[n]-s,_=i[n]-o,r=-1;++r<=n;)e=r/n,this._basis.point(this._beta*t[r]+(1-this._beta)*(s+e*h),this._beta*i[r]+(1-this._beta)*(o+e*_));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};var vt=function t(i){function n(t){return 1===i?new ut(t):new pt(t,i)}return n.beta=function(i){return t(+i)},n}(.85);function dt(t,i,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Tt(t,i){this._context=t,this._k=(1-i)/6}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:dt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:dt(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var gt=function t(i){function n(t){return new Tt(t,i)}return n.tension=function(i){return t(+i)},n}(0);function bt(t,i){this._context=t,this._k=(1-i)/6}bt.prototype={areaStart:ct,areaEnd:ct,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:dt(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var mt=function t(i){function n(t){return new bt(t,i)}return n.tension=function(i){return t(+i)},n}(0);function wt(t,i){this._context=t,this._k=(1-i)/6}wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:dt(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var kt=function t(i){function n(t){return new wt(t,i)}return n.tension=function(i){return t(+i)},n}(0);function Nt(t,i,n){var e=t._x1,s=t._y1,o=t._x2,h=t._y2;if(t._l01_a>c){var _=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,r=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*_-t._x0*t._l12_2a+t._x2*t._l01_2a)/r,s=(s*_-t._y0*t._l12_2a+t._y2*t._l01_2a)/r}if(t._l23_a>c){var a=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*a+t._x1*t._l23_2a-i*t._l12_2a)/l,h=(h*a+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(e,s,o,h,t._x2,t._y2)}function Mt(t,i){this._context=t,this._alpha=i}Mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:Nt(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var St=function t(i){function n(t){return i?new Mt(t,i):new Tt(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Et(t,i){this._context=t,this._alpha=i}Et.prototype={areaStart:ct,areaEnd:ct,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:Nt(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var At=function t(i){function n(t){return i?new Et(t,i):new bt(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Pt(t,i){this._context=t,this._alpha=i}Pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var n=this._x2-t,e=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Nt(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};var Ct=function t(i){function n(t){return i?new Pt(t,i):new wt(t,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Ot(t){this._context=t}function Rt(t){return t<0?-1:1}function qt(t,i,n){var e=t._x1-t._x0,s=i-t._x1,o=(t._y1-t._y0)/(e||s<0&&-0),h=(n-t._y1)/(s||e<0&&-0),_=(o*s+h*e)/(e+s);return(Rt(o)+Rt(h))*Math.min(Math.abs(o),Math.abs(h),.5*Math.abs(_))||0}function zt(t,i){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-i)/2:i}function Xt(t,i,n){var e=t._x0,s=t._y0,o=t._x1,h=t._y1,_=(o-e)/3;t._context.bezierCurveTo(e+_,s+_*i,o-_,h-_*n,o,h)}function Yt(t){this._context=t}function Bt(t){this._context=new jt(t)}function jt(t){this._context=t}function It(t){this._context=t}function Dt(t){var i,n,e=t.length-1,s=new Array(e),o=new Array(e),h=new Array(e);for(s[0]=0,o[0]=2,h[0]=t[0]+2*t[1],i=1;i<e-1;++i)s[i]=1,o[i]=4,h[i]=4*t[i]+2*t[i+1];for(s[e-1]=2,o[e-1]=7,h[e-1]=8*t[e-1]+t[e],i=1;i<e;++i)n=s[i]/o[i-1],o[i]-=n,h[i]-=n*h[i-1];for(s[e-1]=h[e-1]/o[e-1],i=e-2;i>=0;--i)s[i]=(h[i]-s[i+1])/o[i];for(o[e-1]=(t[e]+s[e-1])/2,i=0;i<e-1;++i)o[i]=2*t[i+1]-s[i+1];return[s,o]}function Lt(t,i){this._context=t,this._t=i}function Vt(t,i){if((s=t.length)>1)for(var n,e,s,o=1,h=t[i[0]],_=h.length;o<s;++o)for(e=h,h=t[i[o]],n=0;n<_;++n)h[n][1]+=h[n][0]=isNaN(e[n][1])?e[n][0]:e[n][1]}function Wt(t){for(var i=t.length,n=new Array(i);--i>=0;)n[i]=i;return n}function Ht(t,i){return t[i]}function Ft(t){const i=[];return i.key=t,i}function Gt(t){var i=t.map(Jt);return Wt(t).sort((function(t,n){return i[t]-i[n]}))}function Jt(t){for(var i,n=-1,e=0,s=t.length,o=-1/0;++n<s;)(i=+t[n][1])>o&&(o=i,e=n);return e}function Kt(t){var i=t.map(Qt);return Wt(t).sort((function(t,n){return i[t]-i[n]}))}function Qt(t){for(var i,n=0,e=-1,s=t.length;++e<s;)(i=+t[e][1])&&(n+=i);return n}Ot.prototype={areaStart:ct,areaEnd:ct,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}},Yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Xt(this,this._t0,zt(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var n=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,Xt(this,zt(this,n=qt(this,t,i)),n);break;default:Xt(this,this._t0,n=qt(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=n}}},(Bt.prototype=Object.create(Yt.prototype)).point=function(t,i){Yt.prototype.point.call(this,i,t)},jt.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,n,e,s,o){this._context.bezierCurveTo(i,t,e,n,o,s)}},It.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===n)this._context.lineTo(t[1],i[1]);else for(var e=Dt(t),s=Dt(i),o=0,h=1;h<n;++o,++h)this._context.bezierCurveTo(e[0][o],s[0][o],e[1][o],s[1][o],t[h],i[h]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},Lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,i)}}this._x=t,this._y=i}},t.arc=function(){var t=p,h=v,w=n(0),k=null,N=d,M=T,S=g,E=null;function A(){var n,p,v=+t.apply(this,arguments),d=+h.apply(this,arguments),T=N.apply(this,arguments)-u,g=M.apply(this,arguments)-u,A=e(g-T),P=g>T;if(E||(E=n=i.path()),d<v&&(p=d,d=v,v=p),d>c)if(A>f-c)E.moveTo(d*o(T),d*r(T)),E.arc(0,0,d,T,g,!P),v>c&&(E.moveTo(v*o(g),v*r(g)),E.arc(0,0,v,g,T,P));else{var C,O,R=T,q=g,z=T,X=g,Y=A,B=A,j=S.apply(this,arguments)/2,I=j>c&&(k?+k.apply(this,arguments):a(v*v+d*d)),D=_(e(d-v)/2,+w.apply(this,arguments)),L=D,V=D;if(I>c){var W=x(I/v*r(j)),H=x(I/d*r(j));(Y-=2*W)>c?(z+=W*=P?1:-1,X-=W):(Y=0,z=X=(T+g)/2),(B-=2*H)>c?(R+=H*=P?1:-1,q-=H):(B=0,R=q=(T+g)/2)}var F=d*o(R),G=d*r(R),J=v*o(X),K=v*r(X);if(D>c){var Q,U=d*o(q),Z=d*r(q),$=v*o(z),tt=v*r(z);if(A<l&&(Q=b(F,G,$,tt,U,Z,J,K))){var it=F-Q[0],nt=G-Q[1],et=U-Q[0],st=Z-Q[1],ot=1/r(y((it*et+nt*st)/(a(it*it+nt*nt)*a(et*et+st*st)))/2),ht=a(Q[0]*Q[0]+Q[1]*Q[1]);L=_(D,(v-ht)/(ot-1)),V=_(D,(d-ht)/(ot+1))}}B>c?V>c?(C=m($,tt,F,G,d,V,P),O=m(U,Z,J,K,d,V,P),E.moveTo(C.cx+C.x01,C.cy+C.y01),V<D?E.arc(C.cx,C.cy,V,s(C.y01,C.x01),s(O.y01,O.x01),!P):(E.arc(C.cx,C.cy,V,s(C.y01,C.x01),s(C.y11,C.x11),!P),E.arc(0,0,d,s(C.cy+C.y11,C.cx+C.x11),s(O.cy+O.y11,O.cx+O.x11),!P),E.arc(O.cx,O.cy,V,s(O.y11,O.x11),s(O.y01,O.x01),!P))):(E.moveTo(F,G),E.arc(0,0,d,R,q,!P)):E.moveTo(F,G),v>c&&Y>c?L>c?(C=m(J,K,U,Z,v,-L,P),O=m(F,G,$,tt,v,-L,P),E.lineTo(C.cx+C.x01,C.cy+C.y01),L<D?E.arc(C.cx,C.cy,L,s(C.y01,C.x01),s(O.y01,O.x01),!P):(E.arc(C.cx,C.cy,L,s(C.y01,C.x01),s(C.y11,C.x11),!P),E.arc(0,0,v,s(C.cy+C.y11,C.cx+C.x11),s(O.cy+O.y11,O.cx+O.x11),P),E.arc(O.cx,O.cy,L,s(O.y11,O.x11),s(O.y01,O.x01),!P))):E.arc(0,0,v,X,z,P):E.lineTo(J,K)}else E.moveTo(0,0);if(E.closePath(),n)return E=null,n+""||null}return A.centroid=function(){var i=(+t.apply(this,arguments)+ +h.apply(this,arguments))/2,n=(+N.apply(this,arguments)+ +M.apply(this,arguments))/2-l/2;return[o(n)*i,r(n)*i]},A.innerRadius=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),A):t},A.outerRadius=function(t){return arguments.length?(h="function"==typeof t?t:n(+t),A):h},A.cornerRadius=function(t){return arguments.length?(w="function"==typeof t?t:n(+t),A):w},A.padRadius=function(t){return arguments.length?(k=null==t?null:"function"==typeof t?t:n(+t),A):k},A.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:n(+t),A):N},A.endAngle=function(t){return arguments.length?(M="function"==typeof t?t:n(+t),A):M},A.padAngle=function(t){return arguments.length?(S="function"==typeof t?t:n(+t),A):S},A.context=function(t){return arguments.length?(E=null==t?null:t,A):E},A},t.area=P,t.areaRadial=B,t.curveBasis=function(t){return new ut(t)},t.curveBasisClosed=function(t){return new ft(t)},t.curveBasisOpen=function(t){return new yt(t)},t.curveBumpX=function(t){return new xt(t,!0)},t.curveBumpY=function(t){return new xt(t,!1)},t.curveBundle=vt,t.curveCardinal=gt,t.curveCardinalClosed=mt,t.curveCardinalOpen=kt,t.curveCatmullRom=St,t.curveCatmullRomClosed=At,t.curveCatmullRomOpen=Ct,t.curveLinear=M,t.curveLinearClosed=function(t){return new Ot(t)},t.curveMonotoneX=function(t){return new Yt(t)},t.curveMonotoneY=function(t){return new Bt(t)},t.curveNatural=function(t){return new It(t)},t.curveStep=function(t){return new Lt(t,.5)},t.curveStepAfter=function(t){return new Lt(t,1)},t.curveStepBefore=function(t){return new Lt(t,0)},t.line=A,t.lineRadial=Y,t.linkHorizontal=function(){return L(V)},t.linkRadial=function(){var t=L(H);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return L(W)},t.pie=function(){var t=O,i=C,e=null,s=n(0),o=n(f),h=n(0);function _(n){var _,r,a,c,l,u=(n=k(n)).length,y=0,x=new Array(u),p=new Array(u),v=+s.apply(this,arguments),d=Math.min(f,Math.max(-f,o.apply(this,arguments)-v)),T=Math.min(Math.abs(d)/u,h.apply(this,arguments)),g=T*(d<0?-1:1);for(_=0;_<u;++_)(l=p[x[_]=_]=+t(n[_],_,n))>0&&(y+=l);for(null!=i?x.sort((function(t,n){return i(p[t],p[n])})):null!=e&&x.sort((function(t,i){return e(n[t],n[i])})),_=0,a=y?(d-u*g)/y:0;_<u;++_,v=c)r=x[_],c=v+((l=p[r])>0?l*a:0)+g,p[r]={data:n[r],index:_,value:l,startAngle:v,endAngle:c,padAngle:T};return p}return _.value=function(i){return arguments.length?(t="function"==typeof i?i:n(+i),_):t},_.sortValues=function(t){return arguments.length?(i=t,e=null,_):i},_.sort=function(t){return arguments.length?(e=t,i=null,_):e},_.startAngle=function(t){return arguments.length?(s="function"==typeof t?t:n(+t),_):s},_.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),_):o},_.padAngle=function(t){return arguments.length?(h="function"==typeof t?t:n(+t),_):h},_},t.pointRadial=j,t.radialArea=B,t.radialLine=Y,t.stack=function(){var t=n([]),i=Wt,e=Vt,s=Ht;function o(n){var o,h,_=Array.from(t.apply(this,arguments),Ft),r=_.length,a=-1;for(const t of n)for(o=0,++a;o<r;++o)(_[o][a]=[0,+s(t,_[o].key,a,n)]).data=t;for(o=0,h=k(i(_));o<r;++o)_[h[o]].index=o;return e(_,h),_}return o.keys=function(i){return arguments.length?(t="function"==typeof i?i:n(Array.from(i)),o):t},o.value=function(t){return arguments.length?(s="function"==typeof t?t:n(+t),o):s},o.order=function(t){return arguments.length?(i=null==t?Wt:"function"==typeof t?t:n(Array.from(t)),o):i},o.offset=function(t){return arguments.length?(e=null==t?Vt:t,o):e},o},t.stackOffsetDiverging=function(t,i){if((_=t.length)>0)for(var n,e,s,o,h,_,r=0,a=t[i[0]].length;r<a;++r)for(o=h=0,n=0;n<_;++n)(s=(e=t[i[n]][r])[1]-e[0])>0?(e[0]=o,e[1]=o+=s):s<0?(e[1]=h,e[0]=h+=s):(e[0]=0,e[1]=s)},t.stackOffsetExpand=function(t,i){if((e=t.length)>0){for(var n,e,s,o=0,h=t[0].length;o<h;++o){for(s=n=0;n<e;++n)s+=t[n][o][1]||0;if(s)for(n=0;n<e;++n)t[n][o][1]/=s}Vt(t,i)}},t.stackOffsetNone=Vt,t.stackOffsetSilhouette=function(t,i){if((n=t.length)>0){for(var n,e=0,s=t[i[0]],o=s.length;e<o;++e){for(var h=0,_=0;h<n;++h)_+=t[h][e][1]||0;s[e][1]+=s[e][0]=-_/2}Vt(t,i)}},t.stackOffsetWiggle=function(t,i){if((s=t.length)>0&&(e=(n=t[i[0]]).length)>0){for(var n,e,s,o=0,h=1;h<e;++h){for(var _=0,r=0,a=0;_<s;++_){for(var c=t[i[_]],l=c[h][1]||0,u=(l-(c[h-1][1]||0))/2,f=0;f<_;++f){var y=t[i[f]];u+=(y[h][1]||0)-(y[h-1][1]||0)}r+=l,a+=u*l}n[h-1][1]+=n[h-1][0]=o,r&&(o-=a/r)}n[h-1][1]+=n[h-1][0]=o,Vt(t,i)}},t.stackOrderAppearance=Gt,t.stackOrderAscending=Kt,t.stackOrderDescending=function(t){return Kt(t).reverse()},t.stackOrderInsideOut=function(t){var i,n,e=t.length,s=t.map(Qt),o=Gt(t),h=0,_=0,r=[],a=[];for(i=0;i<e;++i)n=o[i],h<_?(h+=s[n],r.push(n)):(_+=s[n],a.push(n));return a.reverse().concat(r)},t.stackOrderNone=Wt,t.stackOrderReverse=function(t){return Wt(t).reverse()},t.symbol=function(t,e){var s=null;function o(){var n;if(s||(s=n=i.path()),t.apply(this,arguments).draw(s,+e.apply(this,arguments)),n)return s=null,n+""||null}return t="function"==typeof t?t:n(t||F),e="function"==typeof e?e:n(void 0===e?64:+e),o.type=function(i){return arguments.length?(t="function"==typeof i?i:n(i),o):t},o.size=function(t){return arguments.length?(e="function"==typeof t?t:n(+t),o):e},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o},t.symbolCircle=F,t.symbolCross=G,t.symbolDiamond=Q,t.symbolSquare=it,t.symbolStar=tt,t.symbolTriangle=et,t.symbolWye=rt,t.symbols=at,Object.defineProperty(t,"__esModule",{value:!0})})); |
{ | ||
"name": "d3-shape", | ||
"version": "2.1.0", | ||
"version": "3.0.0", | ||
"description": "Graphical primitives for visualization, such as lines and areas.", | ||
"homepage": "https://d3js.org/d3-shape/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/d3/d3-shape.git" | ||
}, | ||
"keywords": [ | ||
@@ -13,4 +18,3 @@ "d3", | ||
], | ||
"homepage": "https://d3js.org/d3-shape/", | ||
"license": "BSD-3-Clause", | ||
"license": "ISC", | ||
"author": { | ||
@@ -20,10 +24,3 @@ "name": "Mike Bostock", | ||
}, | ||
"main": "dist/d3-shape.js", | ||
"unpkg": "dist/d3-shape.min.js", | ||
"jsdelivr": "dist/d3-shape.min.js", | ||
"module": "src/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/d3/d3-shape.git" | ||
}, | ||
"type": "module", | ||
"files": [ | ||
@@ -33,19 +30,29 @@ "dist/**/*.js", | ||
], | ||
"scripts": { | ||
"pretest": "rollup -c", | ||
"test": "tape 'test/**/*-test.js' && eslint src", | ||
"prepublishOnly": "rm -rf dist && yarn test", | ||
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js" | ||
"module": "src/index.js", | ||
"main": "src/index.js", | ||
"jsdelivr": "dist/d3-shape.min.js", | ||
"unpkg": "dist/d3-shape.min.js", | ||
"exports": { | ||
"umd": "./dist/d3-shape.min.js", | ||
"default": "./src/index.js" | ||
}, | ||
"sideEffects": false, | ||
"dependencies": { | ||
"d3-path": "1 - 2" | ||
"d3-path": "1 - 3" | ||
}, | ||
"sideEffects": false, | ||
"devDependencies": { | ||
"d3-polygon": "1 - 2", | ||
"d3-polygon": "1 - 3", | ||
"eslint": "7", | ||
"mocha": "8", | ||
"rollup": "2", | ||
"rollup-plugin-terser": "7", | ||
"tape": "4" | ||
"rollup-plugin-terser": "7" | ||
}, | ||
"scripts": { | ||
"test": "mocha 'test/**/*-test.js' && eslint src test", | ||
"prepublishOnly": "rm -rf dist && yarn test && rollup -c", | ||
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd -" | ||
}, | ||
"engines": { | ||
"node": ">=12" | ||
} | ||
} |
@@ -30,3 +30,3 @@ export function point(that, x, y) { | ||
switch (this._point) { | ||
case 3: point(this, this._x1, this._y1); // proceed | ||
case 3: point(this, this._x1, this._y1); // falls through | ||
case 2: this._context.lineTo(this._x1, this._y1); break; | ||
@@ -42,3 +42,3 @@ } | ||
case 1: this._point = 2; break; | ||
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed | ||
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through | ||
default: point(this, x, y); break; | ||
@@ -45,0 +45,0 @@ } |
@@ -29,3 +29,3 @@ import {point} from "./basis.js"; | ||
case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; | ||
case 3: this._point = 4; // proceed | ||
case 3: this._point = 4; // falls through | ||
default: point(this, x, y); break; | ||
@@ -32,0 +32,0 @@ } |
@@ -28,3 +28,3 @@ class Bump { | ||
} | ||
case 1: this._point = 2; // proceed | ||
case 1: this._point = 2; // falls through | ||
default: { | ||
@@ -31,0 +31,0 @@ if (this._x) this._context.bezierCurveTo(this._x0 = (this._x0 + x) / 2, this._y0, this._x0, y, x, y); |
@@ -42,3 +42,3 @@ export function point(that, x, y) { | ||
case 1: this._point = 2; this._x1 = x, this._y1 = y; break; | ||
case 2: this._point = 3; // proceed | ||
case 2: this._point = 3; // falls through | ||
default: point(this, x, y); break; | ||
@@ -45,0 +45,0 @@ } |
@@ -30,3 +30,3 @@ import {point} from "./cardinal.js"; | ||
case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; | ||
case 3: this._point = 4; // proceed | ||
case 3: this._point = 4; // falls through | ||
default: point(this, x, y); break; | ||
@@ -33,0 +33,0 @@ } |
@@ -66,3 +66,3 @@ import {epsilon} from "../math.js"; | ||
case 1: this._point = 2; break; | ||
case 2: this._point = 3; // proceed | ||
case 2: this._point = 3; // falls through | ||
default: point(this, x, y); break; | ||
@@ -69,0 +69,0 @@ } |
@@ -40,3 +40,3 @@ import {CardinalOpen} from "./cardinalOpen.js"; | ||
case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; | ||
case 3: this._point = 4; // proceed | ||
case 3: this._point = 4; // falls through | ||
default: point(this, x, y); break; | ||
@@ -43,0 +43,0 @@ } |
@@ -23,3 +23,3 @@ function Linear(context) { | ||
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; | ||
case 1: this._point = 2; // proceed | ||
case 1: this._point = 2; // falls through | ||
default: this._context.lineTo(x, y); break; | ||
@@ -26,0 +26,0 @@ } |
@@ -26,3 +26,3 @@ function Step(context, t) { | ||
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; | ||
case 1: this._point = 2; // proceed | ||
case 1: this._point = 2; // falls through | ||
default: { | ||
@@ -29,0 +29,0 @@ if (this._t <= 0) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1174
Yes
237400
+ Addedd3-path@3.1.0(transitive)
- Removedd3-path@2.0.0(transitive)
Updatedd3-path@1 - 3