Socket
Socket
Sign inDemoInstall

d3-selection

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-selection - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

22

build/d3-selection.js

@@ -7,3 +7,3 @@ (function (global, factory) {

var version = "0.7.1";
var version = "0.7.2";

@@ -169,2 +169,13 @@ var xhtml = "http://www.w3.org/1999/xhtml";

function customEvent(event1, listener, that, args) {
var event0 = exports.event;
event1.sourceEvent = exports.event;
exports.event = event1;
try {
return listener.apply(that, args);
} finally {
exports.event = event0;
}
}
function sourceEvent() {

@@ -190,4 +201,4 @@ var current = exports.event, source;

function mouse(node, event) {
if (event == null) event = sourceEvent();
function mouse(node) {
var event = sourceEvent();
if (event.changedTouches) event = event.changedTouches[0];

@@ -762,3 +773,3 @@ return point(node, event);

function raise() {
this.parentNode.appendChild(this);
if (this.nextSibling) this.parentNode.appendChild(this);
}

@@ -771,3 +782,3 @@

function lower() {
this.parentNode.insertBefore(this, this.parentNode.firstChild);
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
}

@@ -944,3 +955,4 @@

exports.window = defaultView;
exports.customEvent = customEvent;
}));

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

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3_selection=t.d3_selection||{})}(this,function(t){"use strict";function n(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ht.hasOwnProperty(n)?{space:Ht[n],local:t}:t}function e(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===zt&&n.documentElement.namespaceURI===zt?n.createElement(t):n.createElementNS(e,t)}}function r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(t){var i=n(t);return(i.local?r:e)(i)}function o(t,n,e){return t=u(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function u(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function c(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function s(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;o>r;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function a(t,n,e){var r=Gt.hasOwnProperty(t.type)?o:u;return function(i,o,u){var c,s=this.__on,a=r(n,o,u);if(s)for(var l=0,f=s.length;f>l;++l)if((c=s[l]).type===t.type&&c.name===t.name)return this.removeEventListener(c.type,c.listener,c.capture),this.addEventListener(c.type,c.listener=a,c.capture=e),void(c.value=n);this.addEventListener(t.type,a,e),c={type:t.type,name:t.name,value:n,listener:a,capture:e},s?s.push(c):this.__on=[c]}}function l(t,n,e){var r,i,o=c(t+""),u=o.length;{if(!(arguments.length<2)){for(l=n?a:s,null==e&&(e=!1),r=0;u>r;++r)this.each(l(o[r],n,e));return this}var l=this.node().__on;if(l)for(var f,h=0,p=l.length;p>h;++h)for(r=0,f=l[h];u>r;++r)if((i=o[r]).type===f.type&&i.name===f.name)return f.value}}function f(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function h(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function p(t,n){return null==n&&(n=f()),n.changedTouches&&(n=n.changedTouches[0]),h(t,n)}function _(t){return function(){return this.querySelector(t)}}function d(t){"function"!=typeof t&&(t=_(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,u,c=n[i],s=c.length,a=r[i]=new Array(s),l=0;s>l;++l)(o=c[l])&&(u=t.call(o,o.__data__,l,c))&&("__data__"in o&&(u.__data__=o.__data__),a[l]=u);return new Pt(r,this._parents)}function v(t){return function(){return this.querySelectorAll(t)}}function m(t){"function"!=typeof t&&(t=v(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;e>o;++o)for(var u,c=n[o],s=c.length,a=0;s>a;++a)(u=c[a])&&(r.push(t.call(u,u.__data__,a,c)),i.push(u));return new Pt(r,i)}function y(t){"function"!=typeof t&&(t=kt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,u=n[i],c=u.length,s=r[i]=new Array(c),a=0;c>a;++a)(o=u[a])&&t.call(o,o.__data__,a,u)&&(s[a]=o);return new Pt(r,this._parents)}function g(t){return function(){return t}}function w(t,n,e,r,i,o){for(var u,c=0,s=n.length,a=o.length;a>c;++c)(u=n[c])?(u.__data__=o[c],r[c]=u):e[c]=new S(t,o[c]);for(;s>c;++c)(u=n[c])&&(i[c]=u)}function A(t,n,e,r,i,o,u){var c,s,a,l={},f=n.length,h=o.length,p=new Array(f);for(c=0;f>c;++c)(s=n[c])&&(p[c]=a=Yt+u.call(s,s.__data__,c,n),l[a]||(l[a]=s));for(c=0;h>c;++c)a=Yt+u.call(t,o[c],c,o),(s=l[a])?s!==!0&&(r[c]=s,s.__data__=o[c]):e[c]=new S(t,o[c]),l[a]=!0;for(c=0;f>c;++c)(s=n[c])&&l[p[c]]!==!0&&(i[c]=s)}function x(t,n){if(!t)return p=new Array(this.size()),a=-1,this.each(function(t){p[++a]=t}),p;var e=n?A:w,r=this._parents,i=this._groups;"function"!=typeof t&&(t=g(t));for(var o=i.length,u=new Array(o),c=new Array(o),s=new Array(o),a=0;o>a;++a){var l=r[a],f=i[a],h=f.length,p=t.call(l,l&&l.__data__,a,r),_=p.length,d=c[a]=new Array(_),v=u[a]=new Array(_),m=s[a]=new Array(h);e(l,f,d,v,m,p,n);for(var y,x,S=0,E=0;_>S;++S)if(y=d[S]){for(S>=E&&(E=S+1);!(x=v[E])&&++E<_;);y._next=x||null}}return u=new Pt(u,r),u._enter=c,u._exit=s,u}function S(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function E(t){return new Array(t.length)}function b(){return new Pt(this._enter||this._groups.map(E),this._parents)}function N(){return new Pt(this._exit||this._groups.map(E),this._parents)}function C(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),c=0;o>c;++c)for(var s,a=n[c],l=e[c],f=a.length,h=u[c]=new Array(f),p=0;f>p;++p)(s=a[p]||l[p])&&(h[p]=s);for(;r>c;++c)u[c]=n[c];return new Pt(u,this._parents)}function L(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this}function M(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=T);for(var e=this._groups,r=e.length,i=new Array(r),o=0;r>o;++o){for(var u,c=e[o],s=c.length,a=i[o]=new Array(s),l=0;s>l;++l)(u=c[l])&&(a[l]=u);a.sort(n)}return new Pt(i,this._parents).order()}function T(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function P(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function q(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function B(){for(var t=this._groups,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,o=r.length;o>i;++i){var u=r[i];if(u)return u}return null}function D(){var t=0;return this.each(function(){++t}),t}function O(){return!this.node()}function V(t){for(var n=this._groups,e=0,r=n.length;r>e;++e)for(var i,o=n[e],u=0,c=o.length;c>u;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this}function R(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function H(t,n){return function(){this.setAttribute(t,n)}}function I(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function U(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function k(t,e){var r=n(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?z:R:"function"==typeof e?r.local?j:U:r.local?I:H)(r,e))}function G(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function X(t){return function(){this.style.removeProperty(t)}}function Y(t,n,e){return function(){this.style.setProperty(t,n,e)}}function $(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function F(t,n,e){var r;return arguments.length>1?this.each((null==n?X:"function"==typeof n?$:Y)(t,n,null==e?"":e)):G(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function J(t){return function(){delete this[t]}}function K(t,n){return function(){this[t]=n}}function Q(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function W(t,n){return arguments.length>1?this.each((null==n?J:"function"==typeof n?Q:K)(t,n)):this.node()[t]}function Z(t){return t.trim().split(/^|\s+/)}function tt(t){return t.classList||new nt(t)}function nt(t){this._node=t,this._names=Z(t.getAttribute("class")||"")}function et(t,n){for(var e=tt(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function rt(t,n){for(var e=tt(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function it(t){return function(){et(this,t)}}function ot(t){return function(){rt(this,t)}}function ut(t,n){return function(){(n.apply(this,arguments)?et:rt)(this,t)}}function ct(t,n){var e=Z(t+"");if(arguments.length<2){for(var r=tt(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?ut:n?it:ot)(e,n))}function st(){this.textContent=""}function at(t){return function(){this.textContent=t}}function lt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ft(t){return arguments.length?this.each(null==t?st:("function"==typeof t?lt:at)(t)):this.node().textContent}function ht(){this.innerHTML=""}function pt(t){return function(){this.innerHTML=t}}function _t(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function dt(t){return arguments.length?this.each(null==t?ht:("function"==typeof t?_t:pt)(t)):this.node().innerHTML}function vt(){this.parentNode.appendChild(this)}function mt(){return this.each(vt)}function yt(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gt(){return this.each(yt)}function wt(t){return function(){return this.appendChild(t.apply(this,arguments))}}function At(t,n){return function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)}}function xt(){return null}function St(t,n){var e="function"==typeof t?t:i(t);return this.select(arguments.length<2?wt(e):At(e,null==n?xt:"function"==typeof n?n:_(n)))}function Et(){var t=this.parentNode;t&&t.removeChild(this)}function bt(){return this.each(Et)}function Nt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Ct(t,n,e){var r=G(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Lt(t,n){return function(){return Ct(this,t,n)}}function Mt(t,n){return function(){return Ct(this,t,n.apply(this,arguments))}}function Tt(t,n){return this.each(("function"==typeof n?Mt:Lt)(t,n))}function Pt(t,n){this._groups=t,this._parents=n}function qt(){return new Pt([[document.documentElement]],$t)}function Bt(t){return"string"==typeof t?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],$t)}function Dt(t){return"string"==typeof t?new Pt([document.querySelectorAll(t)],[document.documentElement]):new Pt([t],$t)}function Ot(t,n,e){arguments.length<3&&(e=n,n=f().changedTouches);for(var r,i=0,o=n?n.length:0;o>i;++i)if((r=n[i]).identifier===e)return h(t,r);return null}function Vt(t,n){null==n&&(n=f().touches);for(var e=0,r=n?n.length:0,i=new Array(r);r>e;++e)i[e]=h(t,n[e]);return i}var Rt="0.7.1",zt="http://www.w3.org/1999/xhtml",Ht={svg:"http://www.w3.org/2000/svg",xhtml:zt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},It=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Ut=document.documentElement;if(!Ut.matches){var jt=Ut.webkitMatchesSelector||Ut.msMatchesSelector||Ut.mozMatchesSelector||Ut.oMatchesSelector;It=function(t){return function(){return jt.call(this,t)}}}}var kt=It,Gt={};if(t.event=null,"undefined"!=typeof document){var Xt=document.documentElement;"onmouseenter"in Xt||(Gt={mouseenter:"mouseover",mouseleave:"mouseout"})}var Yt="$";S.prototype={constructor:S,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},nt.prototype={add:function(t){var n=this._names.indexOf(t);0>n&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var $t=[null];Pt.prototype=qt.prototype={constructor:Pt,select:d,selectAll:m,filter:y,data:x,enter:b,exit:N,merge:C,order:L,sort:M,call:P,nodes:q,node:B,size:D,empty:O,each:V,attr:k,style:F,property:W,classed:ct,text:ft,html:dt,raise:mt,lower:gt,append:St,remove:bt,datum:Nt,on:l,dispatch:Tt},t.version=Rt,t.creator=i,t.matcher=kt,t.mouse=p,t.namespace=n,t.namespaces=Ht,t.select=Bt,t.selectAll=Dt,t.selection=qt,t.selector=_,t.selectorAll=v,t.touch=Ot,t.touches=Vt,t.window=G});
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3_selection=t.d3_selection||{})}(this,function(t){"use strict";function n(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),It.hasOwnProperty(n)?{space:It[n],local:t}:t}function e(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Ht&&n.documentElement.namespaceURI===Ht?n.createElement(t):n.createElementNS(e,t)}}function r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function i(t){var i=n(t);return(i.local?r:e)(i)}function o(t,n,e){return t=u(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function u(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function c(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function s(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;o>r;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function a(t,n,e){var r=Xt.hasOwnProperty(t.type)?o:u;return function(i,o,u){var c,s=this.__on,a=r(n,o,u);if(s)for(var l=0,f=s.length;f>l;++l)if((c=s[l]).type===t.type&&c.name===t.name)return this.removeEventListener(c.type,c.listener,c.capture),this.addEventListener(c.type,c.listener=a,c.capture=e),void(c.value=n);this.addEventListener(t.type,a,e),c={type:t.type,name:t.name,value:n,listener:a,capture:e},s?s.push(c):this.__on=[c]}}function l(t,n,e){var r,i,o=c(t+""),u=o.length;{if(!(arguments.length<2)){for(l=n?a:s,null==e&&(e=!1),r=0;u>r;++r)this.each(l(o[r],n,e));return this}var l=this.node().__on;if(l)for(var f,h=0,p=l.length;p>h;++h)for(r=0,f=l[h];u>r;++r)if((i=o[r]).type===f.type&&i.name===f.name)return f.value}}function f(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}}function h(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function p(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function _(t){var n=h();return n.changedTouches&&(n=n.changedTouches[0]),p(t,n)}function v(t){return function(){return this.querySelector(t)}}function d(t){"function"!=typeof t&&(t=v(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,u,c=n[i],s=c.length,a=r[i]=new Array(s),l=0;s>l;++l)(o=c[l])&&(u=t.call(o,o.__data__,l,c))&&("__data__"in o&&(u.__data__=o.__data__),a[l]=u);return new qt(r,this._parents)}function m(t){return function(){return this.querySelectorAll(t)}}function y(t){"function"!=typeof t&&(t=m(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;e>o;++o)for(var u,c=n[o],s=c.length,a=0;s>a;++a)(u=c[a])&&(r.push(t.call(u,u.__data__,a,c)),i.push(u));return new qt(r,i)}function g(t){"function"!=typeof t&&(t=Gt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;e>i;++i)for(var o,u=n[i],c=u.length,s=r[i]=new Array(c),a=0;c>a;++a)(o=u[a])&&t.call(o,o.__data__,a,u)&&(s[a]=o);return new qt(r,this._parents)}function w(t){return function(){return t}}function A(t,n,e,r,i,o){for(var u,c=0,s=n.length,a=o.length;a>c;++c)(u=n[c])?(u.__data__=o[c],r[c]=u):e[c]=new E(t,o[c]);for(;s>c;++c)(u=n[c])&&(i[c]=u)}function x(t,n,e,r,i,o,u){var c,s,a,l={},f=n.length,h=o.length,p=new Array(f);for(c=0;f>c;++c)(s=n[c])&&(p[c]=a=$t+u.call(s,s.__data__,c,n),l[a]||(l[a]=s));for(c=0;h>c;++c)a=$t+u.call(t,o[c],c,o),(s=l[a])?s!==!0&&(r[c]=s,s.__data__=o[c]):e[c]=new E(t,o[c]),l[a]=!0;for(c=0;f>c;++c)(s=n[c])&&l[p[c]]!==!0&&(i[c]=s)}function S(t,n){if(!t)return p=new Array(this.size()),a=-1,this.each(function(t){p[++a]=t}),p;var e=n?x:A,r=this._parents,i=this._groups;"function"!=typeof t&&(t=w(t));for(var o=i.length,u=new Array(o),c=new Array(o),s=new Array(o),a=0;o>a;++a){var l=r[a],f=i[a],h=f.length,p=t.call(l,l&&l.__data__,a,r),_=p.length,v=c[a]=new Array(_),d=u[a]=new Array(_),m=s[a]=new Array(h);e(l,f,v,d,m,p,n);for(var y,g,S=0,E=0;_>S;++S)if(y=v[S]){for(S>=E&&(E=S+1);!(g=d[E])&&++E<_;);y._next=g||null}}return u=new qt(u,r),u._enter=c,u._exit=s,u}function E(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function b(t){return new Array(t.length)}function N(){return new qt(this._enter||this._groups.map(b),this._parents)}function C(){return new qt(this._exit||this._groups.map(b),this._parents)}function L(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),c=0;o>c;++c)for(var s,a=n[c],l=e[c],f=a.length,h=u[c]=new Array(f),p=0;f>p;++p)(s=a[p]||l[p])&&(h[p]=s);for(;r>c;++c)u[c]=n[c];return new qt(u,this._parents)}function M(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this}function T(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=P);for(var e=this._groups,r=e.length,i=new Array(r),o=0;r>o;++o){for(var u,c=e[o],s=c.length,a=i[o]=new Array(s),l=0;s>l;++l)(u=c[l])&&(a[l]=u);a.sort(n)}return new qt(i,this._parents).order()}function P(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function q(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function B(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function D(){for(var t=this._groups,n=0,e=t.length;e>n;++n)for(var r=t[n],i=0,o=r.length;o>i;++i){var u=r[i];if(u)return u}return null}function O(){var t=0;return this.each(function(){++t}),t}function V(){return!this.node()}function R(t){for(var n=this._groups,e=0,r=n.length;r>e;++e)for(var i,o=n[e],u=0,c=o.length;c>u;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this}function z(t){return function(){this.removeAttribute(t)}}function H(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I(t,n){return function(){this.setAttribute(t,n)}}function U(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function k(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function G(t,e){var r=n(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?H:z:"function"==typeof e?r.local?k:j:r.local?U:I)(r,e))}function X(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Y(t){return function(){this.style.removeProperty(t)}}function $(t,n,e){return function(){this.style.setProperty(t,n,e)}}function F(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function J(t,n,e){var r;return arguments.length>1?this.each((null==n?Y:"function"==typeof n?F:$)(t,n,null==e?"":e)):X(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function K(t){return function(){delete this[t]}}function Q(t,n){return function(){this[t]=n}}function W(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Z(t,n){return arguments.length>1?this.each((null==n?K:"function"==typeof n?W:Q)(t,n)):this.node()[t]}function tt(t){return t.trim().split(/^|\s+/)}function nt(t){return t.classList||new et(t)}function et(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function rt(t,n){for(var e=nt(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function it(t,n){for(var e=nt(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function ot(t){return function(){rt(this,t)}}function ut(t){return function(){it(this,t)}}function ct(t,n){return function(){(n.apply(this,arguments)?rt:it)(this,t)}}function st(t,n){var e=tt(t+"");if(arguments.length<2){for(var r=nt(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?ct:n?ot:ut)(e,n))}function at(){this.textContent=""}function lt(t){return function(){this.textContent=t}}function ft(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function ht(t){return arguments.length?this.each(null==t?at:("function"==typeof t?ft:lt)(t)):this.node().textContent}function pt(){this.innerHTML=""}function _t(t){return function(){this.innerHTML=t}}function vt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function dt(t){return arguments.length?this.each(null==t?pt:("function"==typeof t?vt:_t)(t)):this.node().innerHTML}function mt(){this.nextSibling&&this.parentNode.appendChild(this)}function yt(){return this.each(mt)}function gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wt(){return this.each(gt)}function At(t){return function(){return this.appendChild(t.apply(this,arguments))}}function xt(t,n){return function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)}}function St(){return null}function Et(t,n){var e="function"==typeof t?t:i(t);return this.select(arguments.length<2?At(e):xt(e,null==n?St:"function"==typeof n?n:v(n)))}function bt(){var t=this.parentNode;t&&t.removeChild(this)}function Nt(){return this.each(bt)}function Ct(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Lt(t,n,e){var r=X(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Mt(t,n){return function(){return Lt(this,t,n)}}function Tt(t,n){return function(){return Lt(this,t,n.apply(this,arguments))}}function Pt(t,n){return this.each(("function"==typeof n?Tt:Mt)(t,n))}function qt(t,n){this._groups=t,this._parents=n}function Bt(){return new qt([[document.documentElement]],Ft)}function Dt(t){return"string"==typeof t?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],Ft)}function Ot(t){return"string"==typeof t?new qt([document.querySelectorAll(t)],[document.documentElement]):new qt([t],Ft)}function Vt(t,n,e){arguments.length<3&&(e=n,n=h().changedTouches);for(var r,i=0,o=n?n.length:0;o>i;++i)if((r=n[i]).identifier===e)return p(t,r);return null}function Rt(t,n){null==n&&(n=h().touches);for(var e=0,r=n?n.length:0,i=new Array(r);r>e;++e)i[e]=p(t,n[e]);return i}var zt="0.7.2",Ht="http://www.w3.org/1999/xhtml",It={svg:"http://www.w3.org/2000/svg",xhtml:Ht,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ut=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var jt=document.documentElement;if(!jt.matches){var kt=jt.webkitMatchesSelector||jt.msMatchesSelector||jt.mozMatchesSelector||jt.oMatchesSelector;Ut=function(t){return function(){return kt.call(this,t)}}}}var Gt=Ut,Xt={};if(t.event=null,"undefined"!=typeof document){var Yt=document.documentElement;"onmouseenter"in Yt||(Xt={mouseenter:"mouseover",mouseleave:"mouseout"})}var $t="$";E.prototype={constructor:E,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},et.prototype={add:function(t){var n=this._names.indexOf(t);0>n&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ft=[null];qt.prototype=Bt.prototype={constructor:qt,select:d,selectAll:y,filter:g,data:S,enter:N,exit:C,merge:L,order:M,sort:T,call:q,nodes:B,node:D,size:O,empty:V,each:R,attr:G,style:J,property:Z,classed:st,text:ht,html:dt,raise:yt,lower:wt,append:Et,remove:Nt,datum:Ct,on:l,dispatch:Pt},t.version=zt,t.creator=i,t.matcher=Gt,t.mouse=_,t.namespace=n,t.namespaces=It,t.select=Dt,t.selectAll=Ot,t.selection=Bt,t.selector=v,t.selectorAll=m,t.touch=Vt,t.touches=Rt,t.window=X,t.customEvent=f});
export var name = "d3-selection";
export var version = "0.7.1";
export var version = "0.7.2";
export var description = "Data-driven DOM manipulation: select elements and join them to data.";

@@ -4,0 +4,0 @@ export var keywords = ["d3","dom","selection","data-join"];

@@ -15,2 +15,2 @@ export {version} from "./build/package";

export {default as window} from "./src/window";
export {event} from "./src/selection/on";
export {event, customEvent} from "./src/selection/on";
{
"name": "d3-selection",
"version": "0.7.1",
"version": "0.7.2",
"description": "Data-driven DOM manipulation: select elements and join them to data.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -571,2 +571,6 @@ # d3-selection

<a name="customEvent" href="#customEvent">#</a> d3.<b>customEvent</b>(<i>event</i>, <i>listener</i>[, <i>that</i>[, <i>arguments</i>]])
Invokes the specified *listener*, using the specified *that* `this` context and passing the specified *arguments*, if any. During the invocation, [d3.event](#event) is set to the specified *event*; after the listener returns (or throws an error), d3.event is restored to its previous value. In addition, sets *event*.sourceEvent to the prior value of d3.event, allowing custom events to retain a reference to the originating native event. Returns the value returned by the *listener*.
<a name="mouse" href="#mouse">#</a> d3.<b>mouse</b>(<i>container</i>)

@@ -573,0 +577,0 @@

import sourceEvent from "./sourceEvent";
import point from "./point";
export default function(node, event) {
if (event == null) event = sourceEvent();
export default function(node) {
var event = sourceEvent();
if (event.changedTouches) event = event.changedTouches[0];
return point(node, event);
}
function lower() {
this.parentNode.insertBefore(this, this.parentNode.firstChild);
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
}

@@ -4,0 +4,0 @@

@@ -97,1 +97,12 @@ var filterEvents = {};

}
export function customEvent(event1, listener, that, args) {
var event0 = event;
event1.sourceEvent = event;
event = event1;
try {
return listener.apply(that, args);
} finally {
event = event0;
}
}
function raise() {
this.parentNode.appendChild(this);
if (this.nextSibling) this.parentNode.appendChild(this);
}

@@ -4,0 +4,0 @@

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