d3-transition
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -7,3 +7,3 @@ (function (global, factory) { | ||
var version = "0.2.9"; | ||
var version = "0.2.10"; | ||
@@ -10,0 +10,0 @@ var emptyOn = d3Dispatch.dispatch("start", "end", "interrupt"); |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-dispatch"),require("d3-timer"),require("d3-interpolate"),require("d3-color"),require("d3-ease")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-timer","d3-interpolate","d3-color","d3-ease"],n):n(t.d3_transition=t.d3_transition||{},t.d3_selection,t.d3_dispatch,t.d3_timer,t.d3_interpolate,t.d3_color,t.d3_ease)}(this,function(t,n,e,r,i,o,a){"use strict";function u(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};c(t,e,{name:n,index:r,group:i,on:ct,tween:ht,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:dt})}function s(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>dt)throw new Error("too late");return e}function l(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>pt)throw new Error("too late");return e}function f(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function c(t,n,e){function i(t){e.state=_t,e.delay<=t?o(t-e.delay):e.timer.restart(o,e.delay,e.time)}function o(i){var o,l,f,c;for(o in s)c=s[o],c.name===e.name&&(c.state===vt?(c.state=mt,c.timer.stop(),c.on.call("interrupt",t,t.__data__,c.index,c.group),delete s[o]):n>+o&&(c.state=mt,c.timer.stop(),delete s[o]));if(r.timeout(function(){e.state===vt&&(e.timer.restart(a,e.delay,e.time),a(i))}),e.state=pt,e.on.call("start",t,t.__data__,e.index,e.group),e.state===pt){for(e.state=vt,u=new Array(f=e.tween.length),o=0,l=-1;f>o;++o)(c=e.tween[o].value.call(t,t.__data__,e.index,e.group))&&(u[++l]=c);u.length=l+1}}function a(r){for(var i=r<e.duration?e.ease.call(null,r/e.duration):(e.state=yt,1),o=-1,a=u.length;++o<a;)u[o].call(null,i);if(e.state===yt){e.state=mt,e.timer.stop(),e.on.call("end",t,t.__data__,e.index,e.group);for(o in s)if(+o!==n)return void delete s[n];delete t.__transition}}var u,s=t.__transition;s[n]=e,e.timer=r.timer(i,0,e.time)}function h(t,n){var e,r,i,o=t.__transition,a=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state===vt,e.state=mt,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function d(t){return this.each(function(){h(this,t)})}function _(t,n){var e,r;return function(){var i=l(this,t),o=i.tween;if(o!==e){r=e=o;for(var a=0,u=r.length;u>a;++a)if(r[a].name===n){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function p(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=l(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},s=0,f=i.length;f>s;++s)if(i[s].name===n){i[s]=u;break}s===f&&i.push(u)}o.tween=i}}function v(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=f(this.node(),e).tween,o=0,a=i.length;a>o;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?_:p)(e,t,n))}function y(t,n,e){var r=t._id;return t.each(function(){var t=l(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return f(t,r).value[n]}}function m(t,n){var e;return("number"==typeof n?i.interpolateNumber:n instanceof o.color?i.interpolateRgb:(e=o.color(n))?(n=e,i.interpolateRgb):i.interpolateString)(t,n)}function w(t){return function(){this.removeAttribute(t)}}function g(t){return function(){this.removeAttributeNS(t.space,t.local)}}function A(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function b(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}function x(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttribute(t):(a=this.getAttribute(t),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function S(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function P(t,e){var r=n.namespace(t),o="transform"===r?i.interpolateTransformSvg:m;return this.attrTween(t,"function"==typeof e?(r.local?S:x)(r,o,y(this,"attr."+t,e)):null==e?(r.local?g:w)(r):(r.local?b:A)(r,o,e))}function C(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}function E(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function N(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=n.namespace(t);return this.tween(r,(i.local?C:E)(i,e))}function T(t,n){return function(){s(this,t).delay=+n.apply(this,arguments)}}function q(t,n){return n=+n,function(){s(this,t).delay=n}}function V(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?T:q)(n,t)):f(this.node(),n).delay}function k(t,n){return function(){l(this,t).duration=+n.apply(this,arguments)}}function z(t,n){return n=+n,function(){l(this,t).duration=n}}function O(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?k:z)(n,t)):f(this.node(),n).duration}function R(t,n){if("function"!=typeof n)throw new Error;return function(){l(this,t).ease=n}}function j(t){var n=this._id;return arguments.length?this.each(R(n,t)):f(this.node(),n).ease}function I(t){"function"!=typeof t&&(t=n.matcher(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;r>o;++o)for(var a,u=e[o],s=u.length,l=i[o]=new Array(s),f=0;s>f;++f)(a=u[f])&&t.call(a,a.__data__,f,u)&&(l[f]=a);return new it(i,this._parents,this._name,this._id)}function M(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;o>u;++u)for(var s,l=n[u],f=e[u],c=l.length,h=a[u]=new Array(c),d=0;c>d;++d)(s=l[d]||f[d])&&(h[d]=s);for(;r>u;++u)a[u]=n[u];return new it(a,this._parents,this._name,this._id)}function B(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function D(t,n,e){var r,i,o=B(n)?s:l;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}function F(t,n){var e=this._id;return arguments.length<2?f(this.node(),e).on.on(t):this.each(D(e,t,n))}function G(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function H(){return this.on("end.remove",G(this._id))}function J(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;o>s;++s)for(var l,c,h=i[s],d=h.length,_=a[s]=new Array(d),p=0;d>p;++p)(l=h[p])&&(c=t.call(l,l.__data__,p,h))&&("__data__"in l&&(c.__data__=l.__data__),_[p]=c,u(_[p],e,r,p,_,f(l,r)));return new it(a,this._parents,e,r)}function K(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selectorAll(t));for(var i=this._groups,o=i.length,a=[],s=[],l=0;o>l;++l)for(var c,h=i[l],d=h.length,_=0;d>_;++_)if(c=h[_]){for(var p,v=t.call(c,c.__data__,_,h),y=f(c,r),m=0,w=v.length;w>m;++m)(p=v[m])&&u(p,e,r,m,v,y);a.push(v),s.push(c)}return new it(a,s,e,r)}function L(){return new wt(this._groups,this._parents)}function Q(t,e){var r,i,o;return function(){var a=n.window(this).getComputedStyle(this,null),u=a.getPropertyValue(t),s=(this.style.removeProperty(t),a.getPropertyValue(t));return u===s?null:u===r&&s===i?o:o=e(r=u,i=s)}}function U(t){return function(){this.style.removeProperty(t)}}function W(t,e,r){var i,o;return function(){var a=n.window(this).getComputedStyle(this,null).getPropertyValue(t);return a===r?null:a===i?o:o=e(i=a,r)}}function X(t,e,r){var i,o,a;return function(){var u=n.window(this).getComputedStyle(this,null),s=u.getPropertyValue(t),l=r(this);return null==l&&(this.style.removeProperty(t),l=u.getPropertyValue(t)),s===l?null:s===i&&l===o?a:a=e(i=s,o=l)}}function Y(t,n,e){var r="transform"==(t+="")?i.interpolateTransformCss:m;return null==n?this.styleTween(t,Q(t,r)).on("end.style."+t,U(t)):this.styleTween(t,"function"==typeof n?X(t,r,y(this,"style."+t,n)):W(t,r,n),e)}function Z(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function $(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Z(t,n,null==e?"":e))}function tt(t){return function(){this.textContent=t}}function nt(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function et(t){return this.tween("text","function"==typeof t?nt(y(this,"text",t)):tt(null==t?"":t+""))}function rt(){for(var t=this._name,n=this._id,e=at(),r=this._groups,i=r.length,o=0;i>o;++o)for(var a,s=r[o],l=s.length,c=0;l>c;++c)if(a=s[c]){var h=f(a,n);u(a,t,e,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new it(r,this._parents,t,e)}function it(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ot(t){return n.selection().transition(t)}function at(){return++gt}function ut(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return bt.time=r.now(),bt;return e}function st(t){var n,e;t instanceof it?(n=t._id,t=t._name):(n=at(),(e=bt).time=r.now(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;o>a;++a)for(var s,l=i[a],f=l.length,c=0;f>c;++c)(s=l[c])&&u(s,t,n,c,l,e||ut(s,n));return new it(i,this._parents,t,n)}function lt(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>_t&&e.name===n)return new it([[t]],xt,n,+r)}return null}var ft="0.2.9",ct=e.dispatch("start","end","interrupt"),ht=[],dt=0,_t=1,pt=2,vt=3,yt=4,mt=5,wt=n.selection.prototype.constructor,gt=0,At=n.selection.prototype;it.prototype=ot.prototype={constructor:it,select:J,selectAll:K,filter:I,merge:M,selection:L,transition:rt,call:At.call,nodes:At.nodes,node:At.node,size:At.size,empty:At.empty,each:At.each,on:F,attr:P,attrTween:N,style:Y,styleTween:$,text:et,remove:H,tween:v,delay:V,duration:O,ease:j};var bt={time:null,delay:0,duration:250,ease:a.easeCubicInOut};n.selection.prototype.interrupt=d,n.selection.prototype.transition=st;var xt=[null];t.version=ft,t.transition=ot,t.active=lt,t.interrupt=h}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-dispatch"),require("d3-timer"),require("d3-interpolate"),require("d3-color"),require("d3-ease")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-timer","d3-interpolate","d3-color","d3-ease"],n):n(t.d3_transition=t.d3_transition||{},t.d3_selection,t.d3_dispatch,t.d3_timer,t.d3_interpolate,t.d3_color,t.d3_ease)}(this,function(t,n,e,r,i,o,a){"use strict";function u(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};c(t,e,{name:n,index:r,group:i,on:ct,tween:ht,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:dt})}function s(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>dt)throw new Error("too late");return e}function l(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>pt)throw new Error("too late");return e}function f(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function c(t,n,e){function i(t){e.state=_t,e.delay<=t?o(t-e.delay):e.timer.restart(o,e.delay,e.time)}function o(i){var o,l,f,c;for(o in s)c=s[o],c.name===e.name&&(c.state===vt?(c.state=mt,c.timer.stop(),c.on.call("interrupt",t,t.__data__,c.index,c.group),delete s[o]):n>+o&&(c.state=mt,c.timer.stop(),delete s[o]));if(r.timeout(function(){e.state===vt&&(e.timer.restart(a,e.delay,e.time),a(i))}),e.state=pt,e.on.call("start",t,t.__data__,e.index,e.group),e.state===pt){for(e.state=vt,u=new Array(f=e.tween.length),o=0,l=-1;f>o;++o)(c=e.tween[o].value.call(t,t.__data__,e.index,e.group))&&(u[++l]=c);u.length=l+1}}function a(r){for(var i=r<e.duration?e.ease.call(null,r/e.duration):(e.state=yt,1),o=-1,a=u.length;++o<a;)u[o].call(null,i);if(e.state===yt){e.state=mt,e.timer.stop(),e.on.call("end",t,t.__data__,e.index,e.group);for(o in s)if(+o!==n)return void delete s[n];delete t.__transition}}var u,s=t.__transition;s[n]=e,e.timer=r.timer(i,0,e.time)}function h(t,n){var e,r,i,o=t.__transition,a=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state===vt,e.state=mt,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function d(t){return this.each(function(){h(this,t)})}function _(t,n){var e,r;return function(){var i=l(this,t),o=i.tween;if(o!==e){r=e=o;for(var a=0,u=r.length;u>a;++a)if(r[a].name===n){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function p(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=l(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},s=0,f=i.length;f>s;++s)if(i[s].name===n){i[s]=u;break}s===f&&i.push(u)}o.tween=i}}function v(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=f(this.node(),e).tween,o=0,a=i.length;a>o;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?_:p)(e,t,n))}function y(t,n,e){var r=t._id;return t.each(function(){var t=l(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return f(t,r).value[n]}}function m(t,n){var e;return("number"==typeof n?i.interpolateNumber:n instanceof o.color?i.interpolateRgb:(e=o.color(n))?(n=e,i.interpolateRgb):i.interpolateString)(t,n)}function w(t){return function(){this.removeAttribute(t)}}function g(t){return function(){this.removeAttributeNS(t.space,t.local)}}function A(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function b(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}function x(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttribute(t):(a=this.getAttribute(t),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function S(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function P(t,e){var r=n.namespace(t),o="transform"===r?i.interpolateTransformSvg:m;return this.attrTween(t,"function"==typeof e?(r.local?S:x)(r,o,y(this,"attr."+t,e)):null==e?(r.local?g:w)(r):(r.local?b:A)(r,o,e))}function C(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}function E(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function N(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=n.namespace(t);return this.tween(r,(i.local?C:E)(i,e))}function T(t,n){return function(){s(this,t).delay=+n.apply(this,arguments)}}function q(t,n){return n=+n,function(){s(this,t).delay=n}}function V(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?T:q)(n,t)):f(this.node(),n).delay}function k(t,n){return function(){l(this,t).duration=+n.apply(this,arguments)}}function z(t,n){return n=+n,function(){l(this,t).duration=n}}function O(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?k:z)(n,t)):f(this.node(),n).duration}function R(t,n){if("function"!=typeof n)throw new Error;return function(){l(this,t).ease=n}}function j(t){var n=this._id;return arguments.length?this.each(R(n,t)):f(this.node(),n).ease}function I(t){"function"!=typeof t&&(t=n.matcher(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;r>o;++o)for(var a,u=e[o],s=u.length,l=i[o]=new Array(s),f=0;s>f;++f)(a=u[f])&&t.call(a,a.__data__,f,u)&&(l[f]=a);return new it(i,this._parents,this._name,this._id)}function M(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;o>u;++u)for(var s,l=n[u],f=e[u],c=l.length,h=a[u]=new Array(c),d=0;c>d;++d)(s=l[d]||f[d])&&(h[d]=s);for(;r>u;++u)a[u]=n[u];return new it(a,this._parents,this._name,this._id)}function B(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function D(t,n,e){var r,i,o=B(n)?s:l;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}function F(t,n){var e=this._id;return arguments.length<2?f(this.node(),e).on.on(t):this.each(D(e,t,n))}function G(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function H(){return this.on("end.remove",G(this._id))}function J(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;o>s;++s)for(var l,c,h=i[s],d=h.length,_=a[s]=new Array(d),p=0;d>p;++p)(l=h[p])&&(c=t.call(l,l.__data__,p,h))&&("__data__"in l&&(c.__data__=l.__data__),_[p]=c,u(_[p],e,r,p,_,f(l,r)));return new it(a,this._parents,e,r)}function K(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selectorAll(t));for(var i=this._groups,o=i.length,a=[],s=[],l=0;o>l;++l)for(var c,h=i[l],d=h.length,_=0;d>_;++_)if(c=h[_]){for(var p,v=t.call(c,c.__data__,_,h),y=f(c,r),m=0,w=v.length;w>m;++m)(p=v[m])&&u(p,e,r,m,v,y);a.push(v),s.push(c)}return new it(a,s,e,r)}function L(){return new wt(this._groups,this._parents)}function Q(t,e){var r,i,o;return function(){var a=n.window(this).getComputedStyle(this,null),u=a.getPropertyValue(t),s=(this.style.removeProperty(t),a.getPropertyValue(t));return u===s?null:u===r&&s===i?o:o=e(r=u,i=s)}}function U(t){return function(){this.style.removeProperty(t)}}function W(t,e,r){var i,o;return function(){var a=n.window(this).getComputedStyle(this,null).getPropertyValue(t);return a===r?null:a===i?o:o=e(i=a,r)}}function X(t,e,r){var i,o,a;return function(){var u=n.window(this).getComputedStyle(this,null),s=u.getPropertyValue(t),l=r(this);return null==l&&(this.style.removeProperty(t),l=u.getPropertyValue(t)),s===l?null:s===i&&l===o?a:a=e(i=s,o=l)}}function Y(t,n,e){var r="transform"==(t+="")?i.interpolateTransformCss:m;return null==n?this.styleTween(t,Q(t,r)).on("end.style."+t,U(t)):this.styleTween(t,"function"==typeof n?X(t,r,y(this,"style."+t,n)):W(t,r,n),e)}function Z(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function $(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Z(t,n,null==e?"":e))}function tt(t){return function(){this.textContent=t}}function nt(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function et(t){return this.tween("text","function"==typeof t?nt(y(this,"text",t)):tt(null==t?"":t+""))}function rt(){for(var t=this._name,n=this._id,e=at(),r=this._groups,i=r.length,o=0;i>o;++o)for(var a,s=r[o],l=s.length,c=0;l>c;++c)if(a=s[c]){var h=f(a,n);u(a,t,e,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new it(r,this._parents,t,e)}function it(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ot(t){return n.selection().transition(t)}function at(){return++gt}function ut(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return bt.time=r.now(),bt;return e}function st(t){var n,e;t instanceof it?(n=t._id,t=t._name):(n=at(),(e=bt).time=r.now(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,a=0;o>a;++a)for(var s,l=i[a],f=l.length,c=0;f>c;++c)(s=l[c])&&u(s,t,n,c,l,e||ut(s,n));return new it(i,this._parents,t,n)}function lt(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>_t&&e.name===n)return new it([[t]],xt,n,+r)}return null}var ft="0.2.10",ct=e.dispatch("start","end","interrupt"),ht=[],dt=0,_t=1,pt=2,vt=3,yt=4,mt=5,wt=n.selection.prototype.constructor,gt=0,At=n.selection.prototype;it.prototype=ot.prototype={constructor:it,select:J,selectAll:K,filter:I,merge:M,selection:L,transition:rt,call:At.call,nodes:At.nodes,node:At.node,size:At.size,empty:At.empty,each:At.each,on:F,attr:P,attrTween:N,style:Y,styleTween:$,text:et,remove:H,tween:v,delay:V,duration:O,ease:j};var bt={time:null,delay:0,duration:250,ease:a.easeCubicInOut};n.selection.prototype.interrupt=d,n.selection.prototype.transition=st;var xt=[null];t.version=ft,t.transition=ot,t.active=lt,t.interrupt=h}); |
export var name = "d3-transition"; | ||
export var version = "0.2.9"; | ||
export var version = "0.2.10"; | ||
export var description = "Animated transitions for D3 selections."; | ||
@@ -11,3 +11,3 @@ export var keywords = ["d3","dom","transition","animation"]; | ||
export var scripts = {"pretest":"rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -f umd -g d3-color:d3_color,d3-interpolate:d3_interpolate,d3-ease:d3_ease,d3-dispatch:d3_dispatch,d3-selection:d3_selection,d3-timer:d3_timer -n d3_transition -o build/d3-transition.js -- index.js","test":"tape 'test/**/*-test.js' && eslint index.js src test","prepublish":"npm run test && uglifyjs build/d3-transition.js -c -m -o build/d3-transition.min.js","postpublish":"VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-transition.js ../d3.github.com/d3-transition.v0.2.js && cp build/d3-transition.min.js ../d3.github.com/d3-transition.v0.2.min.js && cd ../d3.github.com && git add d3-transition.v0.2.js d3-transition.v0.2.min.js && git commit -m \"d3-transition ${VERSION}\" && git push && cd - && zip -j build/d3-transition.zip -- LICENSE README.md build/d3-transition.js build/d3-transition.min.js"}; | ||
export var dependencies = {"d3-color":"~0.4.0","d3-dispatch":"~0.4.0","d3-ease":"~0.7.0","d3-interpolate":"~0.7.0","d3-selection":"~0.7.0","d3-timer":"~0.4.0"}; | ||
export var dependencies = {"d3-color":"~0.4.0","d3-dispatch":"~0.4.0","d3-ease":"~0.7.0","d3-interpolate":"~0.8.0","d3-selection":"~0.7.0","d3-timer":"~0.4.0"}; | ||
export var devDependencies = {"eslint":"2","json2module":"0.0","rollup":"0.26","jsdom":"9","tape":"4","uglify-js":"2"}; |
{ | ||
"name": "d3-transition", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "Animated transitions for D3 selections.", | ||
@@ -33,3 +33,3 @@ "keywords": [ | ||
"d3-ease": "~0.7.0", | ||
"d3-interpolate": "~0.7.0", | ||
"d3-interpolate": "~0.8.0", | ||
"d3-selection": "~0.7.0", | ||
@@ -36,0 +36,0 @@ "d3-timer": "~0.4.0" |
@@ -19,3 +19,3 @@ # d3-transition | ||
If you use NPM, `npm install d3-transition`. Otherwise, download the [latest release](https://github.com/d3/d3-transition/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-transition.v0.2.min.js) or as part of [D3 4.0 alpha](https://github.com/mbostock/d3/tree/4). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_transition` global is exported: | ||
If you use NPM, `npm install d3-transition`. Otherwise, download the [latest release](https://github.com/d3/d3-transition/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-transition.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_transition` global is exported: | ||
@@ -26,3 +26,3 @@ ```html | ||
<script src="https://d3js.org/d3-ease.v0.7.min.js"></script> | ||
<script src="https://d3js.org/d3-interpolate.v0.7.min.js"></script> | ||
<script src="https://d3js.org/d3-interpolate.v0.8.min.js"></script> | ||
<script src="https://d3js.org/d3-selection.v0.7.min.js"></script> | ||
@@ -29,0 +29,0 @@ <script src="https://d3js.org/d3-timer.v0.4.min.js"></script> |
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
96904
+ Addedd3-interpolate@0.8.3(transitive)
- Removedd3-interpolate@0.7.0(transitive)
Updatedd3-interpolate@~0.8.0