Socket
Socket
Sign inDemoInstall

d3-brush

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-brush - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

4

dist/d3-brush.js

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

// https://d3js.org/d3-brush/ v1.1.1 Copyright 2019 Mike Bostock
// https://d3js.org/d3-brush/ v1.1.2 Copyright 2019 Mike Bostock
(function (global, factory) {

@@ -126,3 +126,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dispatch'), require('d3-drag'), require('d3-interpolate'), require('d3-selection'), require('d3-transition')) :

function defaultFilter() {
return !d3Selection.event.button;
return !d3Selection.event.ctrlKey && !d3Selection.event.button;
}

@@ -129,0 +129,0 @@

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

// https://d3js.org/d3-brush/ v1.1.1 Copyright 2019 Mike Bostock
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-dispatch"),require("d3-drag"),require("d3-interpolate"),require("d3-selection"),require("d3-transition")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-drag","d3-interpolate","d3-selection","d3-transition"],e):e((t=t||self).d3=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,e,n,r,i,s){"use strict";function u(t){return function(){return t}}function a(t,e,n){this.target=t,this.type=e,this.selection=n}function o(){i.event.stopImmediatePropagation()}function l(){i.event.preventDefault(),i.event.stopImmediatePropagation()}var c={name:"drag"},h={name:"space"},f={name:"handle"},d={name:"center"};function p(t){return[+t[0],+t[1]]}function v(t){return[p(t[0]),p(t[1])]}var y={name:"x",handles:["w","e"].map(k),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},m={name:"y",handles:["n","s"].map(k),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},b={name:"xy",handles:["nw","n","ne","w","e","sw","s","se"].map(k),input:function(t){return null==t?null:v(t)},output:function(t){return t}},w={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},g={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},x={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},M={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function k(t){return{type:t}}function z(){return!i.event.button}function A(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function q(){return navigator.maxTouchPoints||"ontouchstart"in this}function P(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function E(t){var p,b=A,E=z,K=q,T=!0,V=e.dispatch(j,"start","brush","end"),S=6;function j(e){var n=e.property("__brush",X).selectAll(".overlay").data([k("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",w.overlay).merge(n).each(function(){var t=P(this).extent;i.select(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([k("selection")]).enter().append("rect").attr("class","selection").attr("cursor",w.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return w[t.type]}),e.each(B).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",G).filter(K).on("touchstart.brush",G).on("touchmove.brush",N).on("touchend.brush touchcancel.brush",O).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function B(){var t=i.select(this),e=P(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-S/2:e[0][0]-S/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-S/2:e[0][1]-S/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+S:S}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+S:S})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function C(t,e,n){return!n&&t.__brush.emitter||new D(t,e)}function D(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function I(t){return i.clientPoint(t,i.event.touches?i.event.touches[0]:i.event)}function G(){if(i.event.touches){if(i.event.changedTouches.length<i.event.touches.length)return l()}else if(p)return;if(E.apply(this,arguments)){var e,r,u,a,v,b,k,z,A,q,K,V=this,S=i.event.target.__data__.type,j="selection"===(T&&i.event.metaKey?S="overlay":S)?c:T&&i.event.altKey?d:f,D=t===m?null:M[S],G=t===y?null:_[S],N=P(V),O=N.extent,X=N.selection,Y=O[0][0],F=O[0][1],H=O[1][0],J=O[1][1],L=0,Q=0,R=D&&G&&T&&i.event.shiftKey,U=I(V),W=U,Z=C(V,arguments,!0).beforestart();"overlay"===S?(X&&(A=!0),N.selection=X=[[e=t===m?Y:U[0],u=t===y?F:U[1]],[v=t===m?H:e,k=t===y?J:u]]):(e=X[0][0],u=X[0][1],v=X[1][0],k=X[1][1]),r=e,a=u,b=v,z=k;var $=i.select(V).attr("pointer-events","none"),tt=$.selectAll(".overlay").attr("cursor",w[S]);if(i.event.touches)Z.moved=nt,Z.ended=it;else{var et=i.select(i.event.view).on("mousemove.brush",nt,!0).on("mouseup.brush",it,!0);T&&et.on("keydown.brush",function(){switch(i.event.keyCode){case 16:R=D&&G;break;case 18:j===f&&(D&&(v=b-L*D,e=r+L*D),G&&(k=z-Q*G,u=a+Q*G),j=d,rt());break;case 32:j!==f&&j!==d||(D<0?v=b-L:D>0&&(e=r-L),G<0?k=z-Q:G>0&&(u=a-Q),j=h,tt.attr("cursor",w.selection),rt());break;default:return}l()},!0).on("keyup.brush",function(){switch(i.event.keyCode){case 16:R&&(q=K=R=!1,rt());break;case 18:j===d&&(D<0?v=b:D>0&&(e=r),G<0?k=z:G>0&&(u=a),j=f,rt());break;case 32:j===h&&(i.event.altKey?(D&&(v=b-L*D,e=r+L*D),G&&(k=z-Q*G,u=a+Q*G),j=d):(D<0?v=b:D>0&&(e=r),G<0?k=z:G>0&&(u=a),j=f),tt.attr("cursor",w[S]),rt());break;default:return}l()},!0),n.dragDisable(i.event.view)}o(),s.interrupt(V),B.call(V),Z.start()}function nt(){var t=I(V);!R||q||K||(Math.abs(t[0]-W[0])>Math.abs(t[1]-W[1])?K=!0:q=!0),W=t,A=!0,l(),rt()}function rt(){var t;switch(L=W[0]-U[0],Q=W[1]-U[1],j){case h:case c:D&&(L=Math.max(Y-e,Math.min(H-v,L)),r=e+L,b=v+L),G&&(Q=Math.max(F-u,Math.min(J-k,Q)),a=u+Q,z=k+Q);break;case f:D<0?(L=Math.max(Y-e,Math.min(H-e,L)),r=e+L,b=v):D>0&&(L=Math.max(Y-v,Math.min(H-v,L)),r=e,b=v+L),G<0?(Q=Math.max(F-u,Math.min(J-u,Q)),a=u+Q,z=k):G>0&&(Q=Math.max(F-k,Math.min(J-k,Q)),a=u,z=k+Q);break;case d:D&&(r=Math.max(Y,Math.min(H,e-L*D)),b=Math.max(Y,Math.min(H,v+L*D))),G&&(a=Math.max(F,Math.min(J,u-Q*G)),z=Math.max(F,Math.min(J,k+Q*G)))}b<r&&(D*=-1,t=e,e=v,v=t,t=r,r=b,b=t,S in g&&tt.attr("cursor",w[S=g[S]])),z<a&&(G*=-1,t=u,u=k,k=t,t=a,a=z,z=t,S in x&&tt.attr("cursor",w[S=x[S]])),N.selection&&(X=N.selection),q&&(r=X[0][0],b=X[1][0]),K&&(a=X[0][1],z=X[1][1]),X[0][0]===r&&X[0][1]===a&&X[1][0]===b&&X[1][1]===z||(N.selection=[[r,a],[b,z]],B.call(V),Z.brush())}function it(){if(o(),i.event.touches){if(i.event.touches.length)return;p&&clearTimeout(p),p=setTimeout(function(){p=null},500)}else n.dragEnable(i.event.view,A),et.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);$.attr("pointer-events","all"),tt.attr("cursor",w.overlay),N.selection&&(X=N.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(X)&&(N.selection=null,B.call(V)),Z.end()}}function N(){C(this,arguments).moved()}function O(){C(this,arguments).ended()}function X(){var e=this.__brush||{selection:null};return e.extent=v(b.apply(this,arguments)),e.dim=t,e}return j.move=function(e,n){e.selection?e.on("start.brush",function(){C(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){C(this,arguments).end()}).tween("brush",function(){var e=this,i=e.__brush,s=C(e,arguments),u=i.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),o=r.interpolate(u,a);function l(t){i.selection=1===t&&null===a?null:o(t),B.call(e),s.brush()}return null!==u&&null!==a?l:l(1)}):e.each(function(){var e=this,r=arguments,i=e.__brush,u=t.input("function"==typeof n?n.apply(e,r):n,i.extent),a=C(e,r).beforestart();s.interrupt(e),i.selection=null===u?null:u,B.call(e),a.start().brush().end()})},j.clear=function(t){j.move(t,null)},D.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){i.customEvent(new a(j,e,t.output(this.state.selection)),V.apply,V,[e,this.that,this.args])}},j.extent=function(t){return arguments.length?(b="function"==typeof t?t:u(v(t)),j):b},j.filter=function(t){return arguments.length?(E="function"==typeof t?t:u(!!t),j):E},j.handleSize=function(t){return arguments.length?(S=+t,j):S},j.keyModifiers=function(t){return arguments.length?(T=!!t,j):T},j.on=function(){var t=V.on.apply(V,arguments);return t===V?j:t},j}t.brush=function(){return E(b)},t.brushSelection=function(t){var e=t.__brush;return e?e.dim.output(e.selection):null},t.brushX=function(){return E(y)},t.brushY=function(){return E(m)},Object.defineProperty(t,"__esModule",{value:!0})});
// https://d3js.org/d3-brush/ v1.1.2 Copyright 2019 Mike Bostock
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-dispatch"),require("d3-drag"),require("d3-interpolate"),require("d3-selection"),require("d3-transition")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-drag","d3-interpolate","d3-selection","d3-transition"],e):e((t=t||self).d3=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,e,n,r,i,s){"use strict";function u(t){return function(){return t}}function a(t,e,n){this.target=t,this.type=e,this.selection=n}function o(){i.event.stopImmediatePropagation()}function l(){i.event.preventDefault(),i.event.stopImmediatePropagation()}var c={name:"drag"},h={name:"space"},f={name:"handle"},d={name:"center"};function p(t){return[+t[0],+t[1]]}function v(t){return[p(t[0]),p(t[1])]}var y={name:"x",handles:["w","e"].map(k),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},m={name:"y",handles:["n","s"].map(k),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},b={name:"xy",handles:["nw","n","ne","w","e","sw","s","se"].map(k),input:function(t){return null==t?null:v(t)},output:function(t){return t}},w={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},g={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},x={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},M={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function k(t){return{type:t}}function z(){return!i.event.ctrlKey&&!i.event.button}function A(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function q(){return navigator.maxTouchPoints||"ontouchstart"in this}function K(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function P(t){var p,b=A,P=z,E=q,T=!0,V=e.dispatch(j,"start","brush","end"),S=6;function j(e){var n=e.property("__brush",X).selectAll(".overlay").data([k("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",w.overlay).merge(n).each(function(){var t=K(this).extent;i.select(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([k("selection")]).enter().append("rect").attr("class","selection").attr("cursor",w.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,function(t){return t.type});r.exit().remove(),r.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return w[t.type]}),e.each(B).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",G).filter(E).on("touchstart.brush",G).on("touchmove.brush",N).on("touchend.brush touchcancel.brush",O).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function B(){var t=i.select(this),e=K(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-S/2:e[0][0]-S/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-S/2:e[0][1]-S/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+S:S}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+S:S})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function C(t,e,n){return!n&&t.__brush.emitter||new D(t,e)}function D(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function I(t){return i.clientPoint(t,i.event.touches?i.event.touches[0]:i.event)}function G(){if(i.event.touches){if(i.event.changedTouches.length<i.event.touches.length)return l()}else if(p)return;if(P.apply(this,arguments)){var e,r,u,a,v,b,k,z,A,q,E,V=this,S=i.event.target.__data__.type,j="selection"===(T&&i.event.metaKey?S="overlay":S)?c:T&&i.event.altKey?d:f,D=t===m?null:M[S],G=t===y?null:_[S],N=K(V),O=N.extent,X=N.selection,Y=O[0][0],F=O[0][1],H=O[1][0],J=O[1][1],L=0,Q=0,R=D&&G&&T&&i.event.shiftKey,U=I(V),W=U,Z=C(V,arguments,!0).beforestart();"overlay"===S?(X&&(A=!0),N.selection=X=[[e=t===m?Y:U[0],u=t===y?F:U[1]],[v=t===m?H:e,k=t===y?J:u]]):(e=X[0][0],u=X[0][1],v=X[1][0],k=X[1][1]),r=e,a=u,b=v,z=k;var $=i.select(V).attr("pointer-events","none"),tt=$.selectAll(".overlay").attr("cursor",w[S]);if(i.event.touches)Z.moved=nt,Z.ended=it;else{var et=i.select(i.event.view).on("mousemove.brush",nt,!0).on("mouseup.brush",it,!0);T&&et.on("keydown.brush",function(){switch(i.event.keyCode){case 16:R=D&&G;break;case 18:j===f&&(D&&(v=b-L*D,e=r+L*D),G&&(k=z-Q*G,u=a+Q*G),j=d,rt());break;case 32:j!==f&&j!==d||(D<0?v=b-L:D>0&&(e=r-L),G<0?k=z-Q:G>0&&(u=a-Q),j=h,tt.attr("cursor",w.selection),rt());break;default:return}l()},!0).on("keyup.brush",function(){switch(i.event.keyCode){case 16:R&&(q=E=R=!1,rt());break;case 18:j===d&&(D<0?v=b:D>0&&(e=r),G<0?k=z:G>0&&(u=a),j=f,rt());break;case 32:j===h&&(i.event.altKey?(D&&(v=b-L*D,e=r+L*D),G&&(k=z-Q*G,u=a+Q*G),j=d):(D<0?v=b:D>0&&(e=r),G<0?k=z:G>0&&(u=a),j=f),tt.attr("cursor",w[S]),rt());break;default:return}l()},!0),n.dragDisable(i.event.view)}o(),s.interrupt(V),B.call(V),Z.start()}function nt(){var t=I(V);!R||q||E||(Math.abs(t[0]-W[0])>Math.abs(t[1]-W[1])?E=!0:q=!0),W=t,A=!0,l(),rt()}function rt(){var t;switch(L=W[0]-U[0],Q=W[1]-U[1],j){case h:case c:D&&(L=Math.max(Y-e,Math.min(H-v,L)),r=e+L,b=v+L),G&&(Q=Math.max(F-u,Math.min(J-k,Q)),a=u+Q,z=k+Q);break;case f:D<0?(L=Math.max(Y-e,Math.min(H-e,L)),r=e+L,b=v):D>0&&(L=Math.max(Y-v,Math.min(H-v,L)),r=e,b=v+L),G<0?(Q=Math.max(F-u,Math.min(J-u,Q)),a=u+Q,z=k):G>0&&(Q=Math.max(F-k,Math.min(J-k,Q)),a=u,z=k+Q);break;case d:D&&(r=Math.max(Y,Math.min(H,e-L*D)),b=Math.max(Y,Math.min(H,v+L*D))),G&&(a=Math.max(F,Math.min(J,u-Q*G)),z=Math.max(F,Math.min(J,k+Q*G)))}b<r&&(D*=-1,t=e,e=v,v=t,t=r,r=b,b=t,S in g&&tt.attr("cursor",w[S=g[S]])),z<a&&(G*=-1,t=u,u=k,k=t,t=a,a=z,z=t,S in x&&tt.attr("cursor",w[S=x[S]])),N.selection&&(X=N.selection),q&&(r=X[0][0],b=X[1][0]),E&&(a=X[0][1],z=X[1][1]),X[0][0]===r&&X[0][1]===a&&X[1][0]===b&&X[1][1]===z||(N.selection=[[r,a],[b,z]],B.call(V),Z.brush())}function it(){if(o(),i.event.touches){if(i.event.touches.length)return;p&&clearTimeout(p),p=setTimeout(function(){p=null},500)}else n.dragEnable(i.event.view,A),et.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);$.attr("pointer-events","all"),tt.attr("cursor",w.overlay),N.selection&&(X=N.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(X)&&(N.selection=null,B.call(V)),Z.end()}}function N(){C(this,arguments).moved()}function O(){C(this,arguments).ended()}function X(){var e=this.__brush||{selection:null};return e.extent=v(b.apply(this,arguments)),e.dim=t,e}return j.move=function(e,n){e.selection?e.on("start.brush",function(){C(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){C(this,arguments).end()}).tween("brush",function(){var e=this,i=e.__brush,s=C(e,arguments),u=i.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),o=r.interpolate(u,a);function l(t){i.selection=1===t&&null===a?null:o(t),B.call(e),s.brush()}return null!==u&&null!==a?l:l(1)}):e.each(function(){var e=this,r=arguments,i=e.__brush,u=t.input("function"==typeof n?n.apply(e,r):n,i.extent),a=C(e,r).beforestart();s.interrupt(e),i.selection=null===u?null:u,B.call(e),a.start().brush().end()})},j.clear=function(t){j.move(t,null)},D.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){i.customEvent(new a(j,e,t.output(this.state.selection)),V.apply,V,[e,this.that,this.args])}},j.extent=function(t){return arguments.length?(b="function"==typeof t?t:u(v(t)),j):b},j.filter=function(t){return arguments.length?(P="function"==typeof t?t:u(!!t),j):P},j.handleSize=function(t){return arguments.length?(S=+t,j):S},j.keyModifiers=function(t){return arguments.length?(T=!!t,j):T},j.on=function(){var t=V.on.apply(V,arguments);return t===V?j:t},j}t.brush=function(){return P(b)},t.brushSelection=function(t){var e=t.__brush;return e?e.dim.output(e.selection):null},t.brushX=function(){return P(y)},t.brushY=function(){return P(m)},Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "d3-brush",
"version": "1.1.1",
"version": "1.1.2",
"description": "Select a one- or two-dimensional region using the mouse or touch.",

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

@@ -120,3 +120,3 @@ # d3-brush

function filter() {
return !event.button;
return !d3.event.ctrlKey && !d3.event.button;
}

@@ -123,0 +123,0 @@ ```

@@ -107,3 +107,3 @@ import {dispatch} from "d3-dispatch";

function defaultFilter() {
return !event.button;
return !event.ctrlKey && !event.button;
}

@@ -110,0 +110,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