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.0 to 0.7.1

build/package.js

67

build/d3-selection.js

@@ -7,2 +7,4 @@ (function (global, factory) {

var version = "0.7.1";
var xhtml = "http://www.w3.org/1999/xhtml";

@@ -173,8 +175,22 @@

function defaultView(node) {
return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
|| (node.document && node) // node is a Window
|| node.defaultView; // node is a Document
function point(node, event) {
var svg = node.ownerSVGElement || node;
if (svg.createSVGPoint) {
var point = svg.createSVGPoint();
point.x = event.clientX, point.y = event.clientY;
point = point.matrixTransform(node.getScreenCTM().inverse());
return [point.x, point.y];
}
var rect = node.getBoundingClientRect();
return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
}
function mouse(node, event) {
if (event == null) event = sourceEvent();
if (event.changedTouches) event = event.changedTouches[0];
return point(node, event);
}
function selector(selector) {

@@ -549,2 +565,8 @@ return function() {

function defaultView(node) {
return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
|| (node.document && node) // node is a Window
|| node.defaultView; // node is a Document
}
function styleRemove(name) {

@@ -878,37 +900,2 @@ return function() {

var bug44083 = typeof navigator !== "undefined" && /WebKit/.test(navigator.userAgent) ? -1 : 0; // https://bugs.webkit.org/show_bug.cgi?id=44083
function point(node, event) {
var svg = node.ownerSVGElement || node;
if (svg.createSVGPoint) {
var point = svg.createSVGPoint();
if (bug44083 < 0) {
var window = defaultView(node);
if (window.scrollX || window.scrollY) {
svg = select(window.document.body).append("svg").style({position: "absolute", top: 0, left: 0, margin: 0, padding: 0, border: "none"}, "important");
var ctm = svg.node().getScreenCTM();
bug44083 = !(ctm.f || ctm.e);
svg.remove();
}
}
if (bug44083) point.x = event.pageX, point.y = event.pageY;
else point.x = event.clientX, point.y = event.clientY;
point = point.matrixTransform(node.getScreenCTM().inverse());
return [point.x, point.y];
}
var rect = node.getBoundingClientRect();
return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
}
function mouse(node, event) {
if (event == null) event = sourceEvent();
if (event.changedTouches) event = event.changedTouches[0];
return point(node, event);
}
function selectAll(selector) {

@@ -942,4 +929,2 @@ return typeof selector === "string"

var version = "0.7.0";
exports.version = version;

@@ -946,0 +931,0 @@ exports.creator = creator;

@@ -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)),Xt.hasOwnProperty(n)?{space:Xt[n],local:t}:t}function e(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===Rt&&n.documentElement.namespaceURI===Rt?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 a(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 s(t,n,e){var r=Yt.hasOwnProperty(t.type)?o:u;return function(i,o,u){var c,a=this.__on,s=r(n,o,u);if(a)for(var l=0,f=a.length;f>l;++l)if((c=a[l]).type===t.type&&c.name===t.name)return this.removeEventListener(c.type,c.listener,c.capture),this.addEventListener(c.type,c.listener=s,c.capture=e),void(c.value=n);this.addEventListener(t.type,s,e),c={type:t.type,name:t.name,value:n,listener:s,capture:e},a?a.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?s:a,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){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function p(t){return function(){return this.querySelector(t)}}function _(t){"function"!=typeof t&&(t=p(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],a=c.length,s=r[i]=new Array(a),l=0;a>l;++l)(o=c[l])&&(u=t.call(o,o.__data__,l,c))&&("__data__"in o&&(u.__data__=o.__data__),s[l]=u);return new Tt(r,this._parents)}function d(t){return function(){return this.querySelectorAll(t)}}function v(t){"function"!=typeof t&&(t=d(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;e>o;++o)for(var u,c=n[o],a=c.length,s=0;a>s;++s)(u=c[s])&&(r.push(t.call(u,u.__data__,s,c)),i.push(u));return new Tt(r,i)}function m(t){"function"!=typeof t&&(t=Ut(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,a=r[i]=new Array(c),s=0;c>s;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&(a[s]=o);return new Tt(r,this._parents)}function y(t){return function(){return t}}function g(t,n,e,r,i,o){for(var u,c=0,a=n.length,s=o.length;s>c;++c)(u=n[c])?(u.__data__=o[c],r[c]=u):e[c]=new x(t,o[c]);for(;a>c;++c)(u=n[c])&&(i[c]=u)}function w(t,n,e,r,i,o,u){var c,a,s,l={},f=n.length,h=o.length,p=new Array(f);for(c=0;f>c;++c)(a=n[c])&&(p[c]=s=kt+u.call(a,a.__data__,c,n),l[s]||(l[s]=a));for(c=0;h>c;++c)s=kt+u.call(t,o[c],c,o),(a=l[s])?a!==!0&&(r[c]=a,a.__data__=o[c]):e[c]=new x(t,o[c]),l[s]=!0;for(c=0;f>c;++c)(a=n[c])&&l[p[c]]!==!0&&(i[c]=a)}function A(t,n){if(!t)return p=new Array(this.size()),s=-1,this.each(function(t){p[++s]=t}),p;var e=n?w:g,r=this._parents,i=this._groups;"function"!=typeof t&&(t=y(t));for(var o=i.length,u=new Array(o),c=new Array(o),a=new Array(o),s=0;o>s;++s){var l=r[s],f=i[s],h=f.length,p=t.call(l,l&&l.__data__,s,r),_=p.length,d=c[s]=new Array(_),v=u[s]=new Array(_),m=a[s]=new Array(h);e(l,f,d,v,m,p,n);for(var A,x,S=0,b=0;_>S;++S)if(A=d[S]){for(S>=b&&(b=S+1);!(x=v[b])&&++b<_;);A._next=x||null}}return u=new Tt(u,r),u._enter=c,u._exit=a,u}function x(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function S(t){return new Array(t.length)}function b(){return new Tt(this._enter||this._groups.map(S),this._parents)}function E(){return new Tt(this._exit||this._groups.map(S),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 a,s=n[c],l=e[c],f=s.length,h=u[c]=new Array(f),p=0;f>p;++p)(a=s[p]||l[p])&&(h[p]=a);for(;r>c;++c)u[c]=n[c];return new Tt(u,this._parents)}function N(){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],a=c.length,s=i[o]=new Array(a),l=0;a>l;++l)(u=c[l])&&(s[l]=u);s.sort(n)}return new Tt(i,this._parents).order()}function T(t,n){return n>t?-1:t>n?1:t>=n?0:NaN}function L(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function P(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t}function q(){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 B(){var t=0;return this.each(function(){++t}),t}function D(){return!this.node()}function O(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 V(t){return function(){this.removeAttribute(t)}}function R(t){return function(){this.removeAttributeNS(t.space,t.local)}}function X(t,n){return function(){this.setAttribute(t,n)}}function z(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function H(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function I(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 U(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?R:V:"function"==typeof e?r.local?I:H:r.local?z:X)(r,e))}function Y(t){return function(){this.style.removeProperty(t)}}function j(t,n,e){return function(){this.style.setProperty(t,n,e)}}function k(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function G(t,n,e){var r;return arguments.length>1?this.each((null==n?Y:"function"==typeof n?k:j)(t,n,null==e?"":e)):h(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)}function K(t){return function(){delete this[t]}}function W(t,n){return function(){this[t]=n}}function $(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function F(t,n){return arguments.length>1?this.each((null==n?K:"function"==typeof n?$:W)(t,n)):this.node()[t]}function J(t){return t.trim().split(/^|\s+/)}function Q(t){return t.classList||new Z(t)}function Z(t){this._node=t,this._names=J(t.getAttribute("class")||"")}function tt(t,n){for(var e=Q(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function nt(t,n){for(var e=Q(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function et(t){return function(){tt(this,t)}}function rt(t){return function(){nt(this,t)}}function it(t,n){return function(){(n.apply(this,arguments)?tt:nt)(this,t)}}function ot(t,n){var e=J(t+"");if(arguments.length<2){for(var r=Q(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?it:n?et:rt)(e,n))}function ut(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function at(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function st(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?at:ct)(t)):this.node().textContent}function lt(){this.innerHTML=""}function ft(t){return function(){this.innerHTML=t}}function ht(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function pt(t){return arguments.length?this.each(null==t?lt:("function"==typeof t?ht:ft)(t)):this.node().innerHTML}function _t(){this.parentNode.appendChild(this)}function dt(){return this.each(_t)}function vt(){this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(){return this.each(vt)}function yt(t){return function(){return this.appendChild(t.apply(this,arguments))}}function gt(t,n){return function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)}}function wt(){return null}function At(t,n){var e="function"==typeof t?t:i(t);return this.select(arguments.length<2?yt(e):gt(e,null==n?wt:"function"==typeof n?n:p(n)))}function xt(){var t=this.parentNode;t&&t.removeChild(this)}function St(){return this.each(xt)}function bt(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Et(t,n,e){var r=h(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 Ct(t,n){return function(){return Et(this,t,n)}}function Nt(t,n){return function(){return Et(this,t,n.apply(this,arguments))}}function Mt(t,n){return this.each(("function"==typeof n?Nt:Ct)(t,n))}function Tt(t,n){this._groups=t,this._parents=n}function Lt(){return new Tt([[document.documentElement]],Gt)}function Pt(t){return"string"==typeof t?new Tt([[document.querySelector(t)]],[document.documentElement]):new Tt([[t]],Gt)}function qt(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>Kt){var i=h(t);if(i.scrollX||i.scrollY){e=Pt(i.document.body).append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=e.node().getScreenCTM();Kt=!(o.f||o.e),e.remove()}}return Kt?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function Bt(t,n){return null==n&&(n=f()),n.changedTouches&&(n=n.changedTouches[0]),qt(t,n)}function Dt(t){return"string"==typeof t?new Tt([document.querySelectorAll(t)],[document.documentElement]):new Tt([t],Gt)}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 qt(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]=qt(t,n[e]);return i}var Rt="http://www.w3.org/1999/xhtml",Xt={svg:"http://www.w3.org/2000/svg",xhtml:Rt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},zt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Ht=document.documentElement;if(!Ht.matches){var It=Ht.webkitMatchesSelector||Ht.msMatchesSelector||Ht.mozMatchesSelector||Ht.oMatchesSelector;zt=function(t){return function(){return It.call(this,t)}}}}var Ut=zt,Yt={};if(t.event=null,"undefined"!=typeof document){var jt=document.documentElement;"onmouseenter"in jt||(Yt={mouseenter:"mouseover",mouseleave:"mouseout"})}var kt="$";x.prototype={constructor:x,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)}},Z.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 Gt=[null];Tt.prototype=Lt.prototype={constructor:Tt,select:_,selectAll:v,filter:m,data:A,enter:b,exit:E,merge:C,order:N,sort:M,call:L,nodes:P,node:q,size:B,empty:D,each:O,attr:U,style:G,property:F,classed:ot,text:st,html:pt,raise:dt,lower:mt,append:At,remove:St,datum:bt,on:l,dispatch:Mt};var Kt="undefined"!=typeof navigator&&/WebKit/.test(navigator.userAgent)?-1:0,Wt="0.7.0";t.version=Wt,t.creator=i,t.matcher=Ut,t.mouse=Bt,t.namespace=n,t.namespaces=Xt,t.select=Pt,t.selectAll=Dt,t.selection=Lt,t.selector=p,t.selectorAll=d,t.touch=Ot,t.touches=Vt,t.window=h});
!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});

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

export {version} from "./build/package";
export {default as creator} from "./src/creator";

@@ -2,0 +3,0 @@ export {default as matcher} from "./src/matcher";

{
"name": "d3-selection",
"version": "0.7.0",
"version": "0.7.1",
"description": "Data-driven DOM manipulation: select elements and join them to data.",

@@ -24,10 +24,10 @@ "keywords": [

"scripts": {
"pretest": "mkdir -p build && node -e 'process.stdout.write(\"var version = \\\"\" + require(\"./package.json\").version + \"\\\"; export * from \\\"../index\\\"; export {version};\");' > build/bundle.js && rollup -f umd -n d3_selection -o build/d3-selection.js -- build/bundle.js",
"test": "faucet `find test -name '*-test.js'` && eslint index.js src",
"prepublish": "npm test && uglifyjs build/d3-selection.js -c -m -o build/d3-selection.min.js && rm -f build/d3-selection.zip && zip -j build/d3-selection.zip -- LICENSE README.md build/d3-selection.js build/d3-selection.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection.js ../d3.github.com/d3-selection.v0.7.js && cp build/d3-selection.min.js ../d3.github.com/d3-selection.v0.7.min.js && cd ../d3.github.com && git add d3-selection.v0.7.js d3-selection.v0.7.min.js && git commit -m \"d3-selection ${VERSION}\" && git push"
"pretest": "rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -f umd -n d3_selection -o build/d3-selection.js -- index.js",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs build/d3-selection.js -c -m -o build/d3-selection.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection.js ../d3.github.com/d3-selection.v0.7.js && cp build/d3-selection.min.js ../d3.github.com/d3-selection.v0.7.min.js && cd ../d3.github.com && git add d3-selection.v0.7.js d3-selection.v0.7.min.js && git commit -m \"d3-selection ${VERSION}\" && git push && cd - && zip -j build/d3-selection.zip -- LICENSE README.md build/d3-selection.js build/d3-selection.min.js"
},
"devDependencies": {
"faucet": "0.0",
"rollup": "0.25",
"json2module": "0.0",
"rollup": "0.26",
"jsdom": "8",

@@ -34,0 +34,0 @@ "tape": "4",

# d3-selection
Selections allow powerful data-driven transformation of the document object model (DOM): set [attributes](#selection_attr), [styles](#selection_style), [properties](#selection_property), [HTML](#selection_html) or [text](#selection_text) content, and more. Using the [data join](#binding-data)’s [enter](#selection_enter) and [exit](#selection_enter) selections, you can also [add](#selection_append) or [remove](#selection_remove) elements to correspond to data.
Selections allow powerful data-driven transformation of the document object model (DOM): set [attributes](#selection_attr), [styles](#selection_style), [properties](#selection_property), [HTML](#selection_html) or [text](#selection_text) content, and more. Using the [data join](#joining-data)’s [enter](#selection_enter) and [exit](#selection_enter) selections, you can also [add](#selection_append) or [remove](#selection_remove) elements to correspond to data.

@@ -39,9 +39,14 @@ Selection methods typically return the current selection, or a new selection, allowing the concise application of multiple operations on a given selection via method chaining. For example, to set the class and color style of all paragraph elements in the current document:

If you use NPM, `npm install d3-selection`. Otherwise, download the [latest release](https://github.com/d3/d3-selection/releases/latest). The released bundle supports AMD, CommonJS, and vanilla environments. Create a custom build using [Rollup](https://github.com/rollup/rollup) or your preferred bundler. You can also load directly from [d3js.org](https://d3js.org):
If you use NPM, `npm install d3-selection`. Otherwise, download the [latest release](https://github.com/d3/d3-selection/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-selection.v0.7.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_selection` global is exported:
```html
<script src="https://d3js.org/d3-selection.v0.6.min.js"></script>
<script src="https://d3js.org/d3-selection.v0.7.min.js"></script>
<script>
var div = d3_selection.selectAll("div");
</script>
```
In a vanilla environment, a `d3_selection` global is exported. [Try d3-selection in your browser.](https://tonicdev.com/npm/d3-selection)
[Try d3-selection in your browser.](https://tonicdev.com/npm/d3-selection)

@@ -52,3 +57,3 @@ ## API Reference

* [Modifying Elements](#modifying-elements)
* [Binding Data](#binding-data)
* [Joining Data](#joining-data)
* [Handling Events](#handling-events)

@@ -64,3 +69,3 @@ * [Control Flow](#control-flow)

[Selects](#select) the root element, `document.documentElement`. This function can also be used to check if an object is a selection (`instanceof selection`) or to extend the selection prototype. For example, to add a method to check checkboxes:
[Selects](#select) the root element, `document.documentElement`. This function can also be used to test for selections (`instanceof d3.selection`) or to extend the selection prototype. For example, to add a method to check checkboxes:

@@ -127,7 +132,7 @@ ```js

Unlike [*selection*.selectAll](#selection_selectAll), *selection*.select does not affect grouping: it preserves the existing group structure and indexes, and propagates data (if any) to selected children. Grouping plays an important role in the [data join](#binding-data). See [Nested Selections](http://bost.ocks.org/mike/nest/) and [How Selections Work](http://bost.ocks.org/mike/selection/) for more on this topic.
Unlike [*selection*.selectAll](#selection_selectAll), *selection*.select does not affect grouping: it preserves the existing group structure and indexes, and propagates data (if any) to selected children. Grouping plays an important role in the [data join](#joining-data). See [Nested Selections](http://bost.ocks.org/mike/nest/) and [How Selections Work](http://bost.ocks.org/mike/selection/) for more on this topic.
<a name="selection_selectAll" href="#selection_selectAll">#</a> <i>selection</i>.<b>selectAll</b>(<i>selector</i>)
For each selected element, selects the descendant elements that match the specified *selector* string. The elements in the returned selection are grouped by their corresponding parent node in this selection. If no element matches the specified selector for the current element, the group at the current index will be empty. The selected elements do not inherit data from the current selection; use [*selection*.data](#selection_data) to propagate data to children. For example, to select the bold elements in every paragraph:
For each selected element, selects the descendant elements that match the specified *selector* string. The elements in the returned selection are grouped by their corresponding parent node in this selection. If no element matches the specified selector for the current element, the group at the current index will be empty. The selected elements do not inherit data from this selection; use [*selection*.data](#selection_data) to propagate data to children. For example, to select the bold elements in every paragraph:

@@ -138,3 +143,3 @@ ```js

If the *selector* is a function, it is evaluated for each selected element, in order, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. It must return an array of elements (or a psuedo-array, such as a NodeList), or the empty array if there are no matching elements. For example, to select the previous and next siblings of each paragraph:
If the *selector* is a function, it is evaluated for each selected element, in order, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. It must return an array of elements (or a pseudo-array, such as a NodeList), or the empty array if there are no matching elements. For example, to select the previous and next siblings of each paragraph:

@@ -150,3 +155,3 @@ ```js

Unlike [*selection*.select](#selection_select), *selection*.selectAll does affect grouping: each selected descendant is grouped by the parent element in the originating selection. Grouping plays an important role in the [data join](#binding-data). See [Nested Selections](http://bost.ocks.org/mike/nest/) and [How Selections Work](http://bost.ocks.org/mike/selection/) for more on this topic.
Unlike [*selection*.select](#selection_select), *selection*.selectAll does affect grouping: each selected descendant is grouped by the parent element in the originating selection. Grouping plays an important role in the [data join](#joining-data). See [Nested Selections](http://bost.ocks.org/mike/nest/) and [How Selections Work](http://bost.ocks.org/mike/selection/) for more on this topic.

@@ -183,5 +188,5 @@ <a name="selection_filter" href="#selection_filter">#</a> <i>selection</i>.<b>filter</b>(<i>filter</i>)

<a name="selection_merge" href="#selection_merge">#</a> <i>selection</i>.<b>merge</b>(<i>selection</i>)
<a name="selection_merge" href="#selection_merge">#</a> <i>selection</i>.<b>merge</b>(<i>other</i>)
Returns a new selection merging this selection with the specified *selection*. The returned selection has the same number of groups and the same parents as this selection. Any missing (null) elements in this selection are filled with the corresponding element, if present (not null), from the specified *selection*.
Returns a new selection merging this selection with the specified *other* selection. The returned selection has the same number of groups and the same parents as this selection. Any missing (null) elements in this selection are filled with the corresponding element, if present (not null), from the specified *selection*. (If the *other* selection has additional groups or parents, they are ignored.)

@@ -191,9 +196,14 @@ This method is commonly used to merge the [enter](#selection_enter) and [update](#selection_data) selections after a [data-join](#joining-data). After modifying the entering and updating elements separately, you can merge the two selections and perform operations on both without duplicate code. For example:

```js
var circle = svg.selectAll("circle").data(data).style("fill", "blue"), // blue on UPDATE
circleExit = circle.exit().remove(), // remove on EXIT
circleEnter = circle.enter().append("circle").style("fill", "green"); // green on ENTER
circle.merge(circleEnter).style("stroke", "black"); // stroke on UPDATE or ENTER
var circle = svg.selectAll("circle").data(data) // UPDATE
.style("fill", "blue");
circle.exit().remove(); // EXIT
circle.enter().append("circle") // ENTER
.style("fill", "green")
.merge(circle) // ENTER + UPDATE
.style("stroke", "black");
```
This method is also useful for merging [filtered](#selection_filter) selections because filtered selections retain the index structure of the originating selection. Note, however, that this method is not useful for concatenating arbitrary selections: if both this selection and the specified *selection* have (non-null) elements at the same index, this selection’s element is returned in the merge and the specified *selection*’s element is ignored.
This method is also useful for merging [filtered](#selection_filter) selections because filtered selections retain the index structure of the originating selection. Note, however, that this method is not useful for concatenating arbitrary selections: if both this selection and the specified *other* selection have (non-null) elements at the same index, this selection’s element is returned in the merge and the *other* selection’s element is ignored.

@@ -316,3 +326,3 @@ <a name="matcher" href="#matcher">#</a> d3.<b>matcher</b>(<i>selector</i>)

If the specified *type* is a string, appends a new element of this type (tag name) as the last child of each element in the current selection. Otherwise, the *type* may be a function which is evaluated for each selected element, in order, being passed the current datum *d* and index *i*, with the `this` context as the current DOM element. This function should return an element to be appended. Typically, the function creates a new element, but it may instead return an existing element. For example, to append a DIV element to each paragraph:
If the specified *type* is a string, appends a new element of this type (tag name) as the last child of each element in this selection. Otherwise, the *type* may be a function which is evaluated for each selected element, in order, being passed the current datum *d* and index *i*, with the `this` context as the current DOM element. This function should return an element to be appended. Typically, the function creates a new element, but it may instead return an existing element. For example, to append a DIV element to each paragraph:

@@ -548,3 +558,3 @@ ```js

When an specified event is dispatched on a selected node, the specified *listener* will be invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. Listeners always see the latest datum for their element, but the index is a property of the selection and is fixed when the listener is assigned; to update the index, re-assign the listener. To access the current event within a listener, use [d3.event](#event).
When a specified event is dispatched on a selected node, the specified *listener* will be invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. Listeners always see the latest datum for their element, but the index is a property of the selection and is fixed when the listener is assigned; to update the index, re-assign the listener. To access the current event within a listener, use [d3.event](#event).

@@ -589,7 +599,17 @@ If an event listener was previously registered for the same *typename* on a selected element, the old listener is removed before the new listener is added. To remove a listener, pass null as the *listener*. To remove all listeners for a given name, pass null as the *listener* and `.foo` as the *typename*, where `foo` is the name; to remove all listeners with no name, specify `.` as the *typename*.

Invokes the specified *function* for each selected element, passing in the current datum `d` and index `i`, with the `this` context of the current DOM element. This method is used internally by many [transformation methods](#modifying-elements) and can be used to invoke arbitrary code for each selected element.
Invokes the specified *function* for each selected element, passing in the current datum `d` and index `i`, with the `this` context of the current DOM element. This method can be used to invoke arbitrary code for each selected element, and is useful for creating a context to access parent and child data simultaneously, such as:
```js
parent.each(function(p, j) {
d3.select(this)
.selectAll(".child")
.text(function(d, i) { return "child " + d.name + " of " + p.name; });
});
```
See [Sized Donut Multiples](http://bl.ocks.org/mbostock/4c5fad723c87d2fd8273) for an example.
<a name="selection_call" href="#selection_call">#</a> <i>selection</i>.<b>call</b>(<i>function</i>[, <i>arguments…</i>])
Invokes the specified *function* (exactly once), passing in the current selection along with any optional *arguments*. Returns the current selection. This is equivalent to invoking the function by hand but facilitates method chaining. For example, to set several attributes in a reusable function:
Invokes the specified *function* exactly once, passing in this selection along with any optional *arguments*. Returns this selection. This is equivalent to invoking the function by hand but facilitates method chaining. For example, to set several styles in a reusable function:

@@ -618,3 +638,3 @@ ```javascript

Returns true if this selection is empty. A selection is empty if it contains no elements, or all elements are null.
Returns true if this selection contains no (non-null) elements.

@@ -621,0 +641,0 @@ <a name="selection_nodes" href="#selection_nodes">#</a> <i>selection</i>.<b>nodes</b>()

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

import defaultView from "./window";
import select from "./select";
var bug44083 = typeof navigator !== "undefined" && /WebKit/.test(navigator.userAgent) ? -1 : 0; // https://bugs.webkit.org/show_bug.cgi?id=44083
export default function(node, event) {

@@ -11,16 +6,3 @@ var svg = node.ownerSVGElement || node;

var point = svg.createSVGPoint();
if (bug44083 < 0) {
var window = defaultView(node);
if (window.scrollX || window.scrollY) {
svg = select(window.document.body).append("svg").style({position: "absolute", top: 0, left: 0, margin: 0, padding: 0, border: "none"}, "important");
var ctm = svg.node().getScreenCTM();
bug44083 = !(ctm.f || ctm.e);
svg.remove();
}
}
if (bug44083) point.x = event.pageX, point.y = event.pageY;
else point.x = event.clientX, point.y = event.clientY;
point.x = event.clientX, point.y = event.clientY;
point = point.matrixTransform(node.getScreenCTM().inverse());

@@ -27,0 +9,0 @@ return [point.x, point.y];

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