Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3-transition

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-transition - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

12

build/d3-transition.js

@@ -1,6 +0,6 @@

// https://d3js.org/d3-transition/ Version 1.0.3. Copyright 2016 Mike Bostock.
// https://d3js.org/d3-transition/ Version 1.0.4. Copyright 2017 Mike Bostock.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-selection'), require('d3-dispatch'), require('d3-timer'), require('d3-interpolate'), require('d3-color'), require('d3-ease')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-selection', 'd3-dispatch', 'd3-timer', 'd3-interpolate', 'd3-color', 'd3-ease'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3,global.d3,global.d3));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-selection'), require('d3-dispatch'), require('d3-timer'), require('d3-interpolate'), require('d3-color'), require('d3-ease')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-selection', 'd3-dispatch', 'd3-timer', 'd3-interpolate', 'd3-color', 'd3-ease'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3,global.d3,global.d3));
}(this, (function (exports,d3Selection,d3Dispatch,d3Timer,d3Interpolate,d3Color,d3Ease) { 'use strict';

@@ -345,3 +345,3 @@

: value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)
: (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
: (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value + ""));
};

@@ -615,3 +615,3 @@

? styleFunction(name, i, tweenValue(this, "style." + name, value))
: styleConstant(name, i, value), priority);
: styleConstant(name, i, value + ""), priority);
};

@@ -618,0 +618,0 @@

@@ -1,2 +0,2 @@

// https://d3js.org/d3-transition/ Version 1.0.3. Copyright 2016 Mike Bostock.
!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=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,i,o,u){"use strict";function a(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>H)throw new Error("too late");return e}function s(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>K)throw new Error("too late");return e}function l(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function f(t,n,e){function i(t){e.state=J,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}function o(i){var f,c,h,d;if(e.state!==J)return a();for(f in l)if(d=l[f],d.name===e.name){if(d.state===L)return r.timeout(o);d.state===Q?(d.state=W,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete l[f]):+f<n&&(d.state=W,d.timer.stop(),delete l[f])}if(r.timeout(function(){e.state===L&&(e.state=Q,e.timer.restart(u,e.delay,e.time),u(i))}),e.state=K,e.on.call("start",t,t.__data__,e.index,e.group),e.state===K){for(e.state=L,s=new Array(h=e.tween.length),f=0,c=-1;f<h;++f)(d=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(s[++c]=d);s.length=c+1}}function u(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=U,1),i=-1,o=s.length;++i<o;)s[i].call(null,r);e.state===U&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){e.state=W,e.timer.stop(),delete l[n];for(var r in l)return;delete t.__transition}var s,l=t.__transition;l[n]=e,e.timer=r.timer(i,0,e.time)}function c(t,n){var e,r;return function(){var i=s(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function h(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=s(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},l=0,f=i.length;l<f;++l)if(i[l].name===n){i[l]=a;break}l===f&&i.push(a)}o.tween=i}}function d(t,n,e){var r=t._id;return t.each(function(){var t=s(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return l(t,r).value[n]}}function p(t){return function(){this.removeAttribute(t)}}function _(t){return function(){this.removeAttributeNS(t.space,t.local)}}function v(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 y(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 m(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttribute(t):(u=this.getAttribute(t),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function g(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function w(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 b(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 A(t,n){return function(){a(this,t).delay=+n.apply(this,arguments)}}function x(t,n){return n=+n,function(){a(this,t).delay=n}}function P(t,n){return function(){s(this,t).duration=+n.apply(this,arguments)}}function S(t,n){return n=+n,function(){s(this,t).duration=n}}function C(t,n){if("function"!=typeof n)throw new Error;return function(){s(this,t).ease=n}}function E(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 N(t,n,e){var r,i,o=E(n)?a:s;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function T(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function q(t,e){var r,i,o;return function(){var u=n.window(this).getComputedStyle(this,null),a=u.getPropertyValue(t),s=(this.style.removeProperty(t),u.getPropertyValue(t));return a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}function V(t){return function(){this.style.removeProperty(t)}}function O(t,e,r){var i,o;return function(){var u=n.window(this).getComputedStyle(this,null).getPropertyValue(t);return u===r?null:u===i?o:o=e(i=u,r)}}function j(t,e,r){var i,o,u;return function(){var a=n.window(this).getComputedStyle(this,null),s=a.getPropertyValue(t),l=r(this);return null==l&&(this.style.removeProperty(t),l=a.getPropertyValue(t)),s===l?null:s===i&&l===o?u:u=e(i=s,o=l)}}function k(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 z(t){return function(){this.textContent=t}}function M(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function R(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function I(t){return n.selection().transition(t)}function B(){return++mt}function D(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return wt.time=r.now(),wt;return e}var F=e.dispatch("start","end","interrupt"),G=[],H=0,J=1,K=2,L=3,Q=4,U=5,W=6,X=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};f(t,e,{name:n,index:r,group:i,on:F,tween:G,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:H})},Y=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state>K&&e.state<U,e.state=W,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},Z=function(t){return this.each(function(){Y(this,t)})},$=function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=l(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?c:h)(e,t,n))},tt=function(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)},nt=function(t,e){var r=n.namespace(t),o="transform"===r?i.interpolateTransformSvg:tt;return this.attrTween(t,"function"==typeof e?(r.local?g:m)(r,o,d(this,"attr."+t,e)):null==e?(r.local?_:p)(r):(r.local?y:v)(r,o,e))},et=function(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?w:b)(i,e))},rt=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?A:x)(n,t)):l(this.node(),n).delay},it=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?P:S)(n,t)):l(this.node(),n).duration},ot=function(t){var n=this._id;return arguments.length?this.each(C(n,t)):l(this.node(),n).ease},ut=function(t){"function"!=typeof t&&(t=n.matcher(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var u,a=e[o],s=a.length,l=i[o]=[],f=0;f<s;++f)(u=a[f])&&t.call(u,u.__data__,f,a)&&l.push(u);return new R(i,this._parents,this._name,this._id)},at=function(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),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],f=e[a],c=l.length,h=u[a]=new Array(c),d=0;d<c;++d)(s=l[d]||f[d])&&(h[d]=s);for(;a<r;++a)u[a]=n[a];return new R(u,this._parents,this._name,this._id)},st=function(t,n){var e=this._id;return arguments.length<2?l(this.node(),e).on.on(t):this.each(N(e,t,n))},lt=function(){return this.on("end.remove",T(this._id))},ft=function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selector(t));for(var i=this._groups,o=i.length,u=new Array(o),a=0;a<o;++a)for(var s,f,c=i[a],h=c.length,d=u[a]=new Array(h),p=0;p<h;++p)(s=c[p])&&(f=t.call(s,s.__data__,p,c))&&("__data__"in s&&(f.__data__=s.__data__),d[p]=f,X(d[p],e,r,p,d,l(s,r)));return new R(u,this._parents,e,r)},ct=function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selectorAll(t));for(var i=this._groups,o=i.length,u=[],a=[],s=0;s<o;++s)for(var f,c=i[s],h=c.length,d=0;d<h;++d)if(f=c[d]){for(var p,_=t.call(f,f.__data__,d,c),v=l(f,r),y=0,m=_.length;y<m;++y)(p=_[y])&&X(p,e,r,y,_,v);u.push(_),a.push(f)}return new R(u,a,e,r)},ht=n.selection.prototype.constructor,dt=function(){return new ht(this._groups,this._parents)},pt=function(t,n,e){var r="transform"==(t+="")?i.interpolateTransformCss:tt;return null==n?this.styleTween(t,q(t,r)).on("end.style."+t,V(t)):this.styleTween(t,"function"==typeof n?j(t,r,d(this,"style."+t,n)):O(t,r,n),e)},_t=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,k(t,n,null==e?"":e))},vt=function(t){return this.tween("text","function"==typeof t?M(d(this,"text",t)):z(null==t?"":t+""))},yt=function(){for(var t=this._name,n=this._id,e=B(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,f=0;f<s;++f)if(u=a[f]){var c=l(u,n);X(u,t,e,f,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new R(r,this._parents,t,e)},mt=0,gt=n.selection.prototype;R.prototype=I.prototype={constructor:R,select:ft,selectAll:ct,filter:ut,merge:at,selection:dt,transition:yt,call:gt.call,nodes:gt.nodes,node:gt.node,size:gt.size,empty:gt.empty,each:gt.each,on:st,attr:nt,attrTween:et,style:pt,styleTween:_t,text:vt,remove:lt,tween:$,delay:rt,duration:it,ease:ot};var wt={time:null,delay:0,duration:250,ease:u.easeCubicInOut},bt=function(t){var n,e;t instanceof R?(n=t._id,t=t._name):(n=B(),(e=wt).time=r.now(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,u=0;u<o;++u)for(var a,s=i[u],l=s.length,f=0;f<l;++f)(a=s[f])&&X(a,t,n,f,s,e||D(a,n));return new R(i,this._parents,t,n)};n.selection.prototype.interrupt=Z,n.selection.prototype.transition=bt;var At=[null],xt=function(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>J&&e.name===n)return new R([[t]],At,n,+r)}return null};t.transition=I,t.active=xt,t.interrupt=Y,Object.defineProperty(t,"__esModule",{value:!0})});
// https://d3js.org/d3-transition/ Version 1.0.4. Copyright 2017 Mike Bostock.
!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=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,i,o,u){"use strict";function a(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>H)throw new Error("too late");return e}function s(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>K)throw new Error("too late");return e}function l(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function f(t,n,e){function i(t){e.state=J,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}function o(i){var f,c,h,d;if(e.state!==J)return a();for(f in l)if(d=l[f],d.name===e.name){if(d.state===L)return r.timeout(o);d.state===Q?(d.state=W,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete l[f]):+f<n&&(d.state=W,d.timer.stop(),delete l[f])}if(r.timeout(function(){e.state===L&&(e.state=Q,e.timer.restart(u,e.delay,e.time),u(i))}),e.state=K,e.on.call("start",t,t.__data__,e.index,e.group),e.state===K){for(e.state=L,s=new Array(h=e.tween.length),f=0,c=-1;f<h;++f)(d=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(s[++c]=d);s.length=c+1}}function u(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=U,1),i=-1,o=s.length;++i<o;)s[i].call(null,r);e.state===U&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){e.state=W,e.timer.stop(),delete l[n];for(var r in l)return;delete t.__transition}var s,l=t.__transition;l[n]=e,e.timer=r.timer(i,0,e.time)}function c(t,n){var e,r;return function(){var i=s(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function h(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=s(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},l=0,f=i.length;l<f;++l)if(i[l].name===n){i[l]=a;break}l===f&&i.push(a)}o.tween=i}}function d(t,n,e){var r=t._id;return t.each(function(){var t=s(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return l(t,r).value[n]}}function p(t){return function(){this.removeAttribute(t)}}function _(t){return function(){this.removeAttributeNS(t.space,t.local)}}function v(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 y(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 m(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttribute(t):(u=this.getAttribute(t),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function g(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function w(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 b(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 A(t,n){return function(){a(this,t).delay=+n.apply(this,arguments)}}function x(t,n){return n=+n,function(){a(this,t).delay=n}}function P(t,n){return function(){s(this,t).duration=+n.apply(this,arguments)}}function S(t,n){return n=+n,function(){s(this,t).duration=n}}function C(t,n){if("function"!=typeof n)throw new Error;return function(){s(this,t).ease=n}}function E(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 N(t,n,e){var r,i,o=E(n)?a:s;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function T(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function q(t,e){var r,i,o;return function(){var u=n.window(this).getComputedStyle(this,null),a=u.getPropertyValue(t),s=(this.style.removeProperty(t),u.getPropertyValue(t));return a===s?null:a===r&&s===i?o:o=e(r=a,i=s)}}function V(t){return function(){this.style.removeProperty(t)}}function O(t,e,r){var i,o;return function(){var u=n.window(this).getComputedStyle(this,null).getPropertyValue(t);return u===r?null:u===i?o:o=e(i=u,r)}}function j(t,e,r){var i,o,u;return function(){var a=n.window(this).getComputedStyle(this,null),s=a.getPropertyValue(t),l=r(this);return null==l&&(this.style.removeProperty(t),l=a.getPropertyValue(t)),s===l?null:s===i&&l===o?u:u=e(i=s,o=l)}}function k(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 z(t){return function(){this.textContent=t}}function M(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function R(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function I(t){return n.selection().transition(t)}function B(){return++mt}function D(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return wt.time=r.now(),wt;return e}var F=e.dispatch("start","end","interrupt"),G=[],H=0,J=1,K=2,L=3,Q=4,U=5,W=6,X=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};f(t,e,{name:n,index:r,group:i,on:F,tween:G,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:H})},Y=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state>K&&e.state<U,e.state=W,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},Z=function(t){return this.each(function(){Y(this,t)})},$=function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=l(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?c:h)(e,t,n))},tt=function(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)},nt=function(t,e){var r=n.namespace(t),o="transform"===r?i.interpolateTransformSvg:tt;return this.attrTween(t,"function"==typeof e?(r.local?g:m)(r,o,d(this,"attr."+t,e)):null==e?(r.local?_:p)(r):(r.local?y:v)(r,o,e+""))},et=function(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?w:b)(i,e))},rt=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?A:x)(n,t)):l(this.node(),n).delay},it=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?P:S)(n,t)):l(this.node(),n).duration},ot=function(t){var n=this._id;return arguments.length?this.each(C(n,t)):l(this.node(),n).ease},ut=function(t){"function"!=typeof t&&(t=n.matcher(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var u,a=e[o],s=a.length,l=i[o]=[],f=0;f<s;++f)(u=a[f])&&t.call(u,u.__data__,f,a)&&l.push(u);return new R(i,this._parents,this._name,this._id)},at=function(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),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],f=e[a],c=l.length,h=u[a]=new Array(c),d=0;d<c;++d)(s=l[d]||f[d])&&(h[d]=s);for(;a<r;++a)u[a]=n[a];return new R(u,this._parents,this._name,this._id)},st=function(t,n){var e=this._id;return arguments.length<2?l(this.node(),e).on.on(t):this.each(N(e,t,n))},lt=function(){return this.on("end.remove",T(this._id))},ft=function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selector(t));for(var i=this._groups,o=i.length,u=new Array(o),a=0;a<o;++a)for(var s,f,c=i[a],h=c.length,d=u[a]=new Array(h),p=0;p<h;++p)(s=c[p])&&(f=t.call(s,s.__data__,p,c))&&("__data__"in s&&(f.__data__=s.__data__),d[p]=f,X(d[p],e,r,p,d,l(s,r)));return new R(u,this._parents,e,r)},ct=function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selectorAll(t));for(var i=this._groups,o=i.length,u=[],a=[],s=0;s<o;++s)for(var f,c=i[s],h=c.length,d=0;d<h;++d)if(f=c[d]){for(var p,_=t.call(f,f.__data__,d,c),v=l(f,r),y=0,m=_.length;y<m;++y)(p=_[y])&&X(p,e,r,y,_,v);u.push(_),a.push(f)}return new R(u,a,e,r)},ht=n.selection.prototype.constructor,dt=function(){return new ht(this._groups,this._parents)},pt=function(t,n,e){var r="transform"==(t+="")?i.interpolateTransformCss:tt;return null==n?this.styleTween(t,q(t,r)).on("end.style."+t,V(t)):this.styleTween(t,"function"==typeof n?j(t,r,d(this,"style."+t,n)):O(t,r,n+""),e)},_t=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,k(t,n,null==e?"":e))},vt=function(t){return this.tween("text","function"==typeof t?M(d(this,"text",t)):z(null==t?"":t+""))},yt=function(){for(var t=this._name,n=this._id,e=B(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,f=0;f<s;++f)if(u=a[f]){var c=l(u,n);X(u,t,e,f,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new R(r,this._parents,t,e)},mt=0,gt=n.selection.prototype;R.prototype=I.prototype={constructor:R,select:ft,selectAll:ct,filter:ut,merge:at,selection:dt,transition:yt,call:gt.call,nodes:gt.nodes,node:gt.node,size:gt.size,empty:gt.empty,each:gt.each,on:st,attr:nt,attrTween:et,style:pt,styleTween:_t,text:vt,remove:lt,tween:$,delay:rt,duration:it,ease:ot};var wt={time:null,delay:0,duration:250,ease:u.easeCubicInOut},bt=function(t){var n,e;t instanceof R?(n=t._id,t=t._name):(n=B(),(e=wt).time=r.now(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,u=0;u<o;++u)for(var a,s=i[u],l=s.length,f=0;f<l;++f)(a=s[f])&&X(a,t,n,f,s,e||D(a,n));return new R(i,this._parents,t,n)};n.selection.prototype.interrupt=Z,n.selection.prototype.transition=bt;var At=[null],xt=function(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>J&&e.name===n)return new R([[t]],At,n,+r)}return null};t.transition=I,t.active=xt,t.interrupt=Y,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "d3-transition",
"version": "1.0.3",
"version": "1.0.4",
"description": "Animated transitions for D3 selections.",

@@ -29,3 +29,3 @@ "keywords": [

"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" 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 && cd ../d3.github.com && git pull && cp ../d3-transition/build/d3-transition.js d3-transition.v1.js && cp ../d3-transition/build/d3-transition.min.js d3-transition.v1.min.js && git add d3-transition.v1.js d3-transition.v1.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"
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-transition/build/d3-transition.js d3-transition.v1.js && cp ../d3-transition/build/d3-transition.min.js d3-transition.v1.min.js && git add d3-transition.v1.js d3-transition.v1.min.js && git commit -m \"d3-transition ${npm_package_version}\" && git push && cd - && zip -j build/d3-transition.zip -- LICENSE README.md build/d3-transition.js build/d3-transition.min.js"
},

@@ -43,7 +43,7 @@ "dependencies": {

"package-preamble": "0.0",
"rollup": "0.36",
"rollup": "0.41",
"jsdom": "9",
"tape": "4",
"uglify-js": "2"
"uglify-js": "^2.8.11"
}
}

@@ -73,3 +73,3 @@ import {interpolateTransformSvg as interpolateTransform} from "d3-interpolate";

: value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)
: (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
: (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value + ""));
}

@@ -59,3 +59,3 @@ import {interpolateTransformCss as interpolateTransform} from "d3-interpolate";

? styleFunction(name, i, tweenValue(this, "style." + name, value))
: styleConstant(name, i, value), priority);
: styleConstant(name, i, value + ""), priority);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc