@d3fc/d3fc-brush
Advanced tools
Comparing version 3.0.1 to 3.0.2
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-selection'), require('d3-scale'), require('d3-dispatch'), require('@d3fc/d3fc-rebind'), require('@d3fc/d3fc-data-join'), require('d3-brush')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'd3-selection', 'd3-scale', 'd3-dispatch', '@d3fc/d3fc-rebind', '@d3fc/d3fc-data-join', 'd3-brush'], factory) : | ||
(global = global || self, factory(global.fc = global.fc || {}, global.d3, global.d3, global.d3, global.fc, global.fc, global.d3)); | ||
}(this, function (exports, d3Selection, d3Scale, d3Dispatch, d3fcRebind, d3fcDataJoin, d3Brush) { 'use strict'; | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fc = global.fc || {}, global.d3, global.d3, global.d3, global.fc, global.fc, global.d3)); | ||
}(this, (function (exports, d3Selection, d3Scale, d3Dispatch, d3fcRebind, d3fcDataJoin, d3Brush) { 'use strict'; | ||
@@ -146,2 +146,2 @@ var brushForOrient = function brushForOrient(orient) { | ||
})); | ||
}))); |
@@ -1,1 +0,1 @@ | ||
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("d3-selection"),require("d3-scale"),require("d3-dispatch"),require("@d3fc/d3fc-rebind"),require("@d3fc/d3fc-data-join"),require("d3-brush")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-scale","d3-dispatch","@d3fc/d3fc-rebind","@d3fc/d3fc-data-join","d3-brush"],b):(a=a||self,b(a.fc=a.fc||{},a.d3,a.d3,a.d3,a.fc,a.fc,a.d3))})(this,function(a,b,c,d,e,f,g){'use strict';var h=function(a){return"x"===a?g.brushX():"y"===a?g.brushY():"xy"===a?g.brush():void 0},i=function(a){return[a[1],a[0]]},j=function(a){var g=h(a),j=d.dispatch("brush","start","end"),k=c.scaleIdentity(),l=c.scaleIdentity(),m=f.dataJoin("g","brush"),n=function(b,c,d){return"x"===a?b.map(c):"y"===a?b.map(d):"xy"===a?[[c(b[0][0]),d(b[0][1])],[c(b[1][0]),d(b[1][1])]]:void 0},o=function(a){return n(a,c.scaleLinear().domain(k.range()).invert,c.scaleLinear().domain(i(l.range())).invert)},p=function(a){return n(a,c.scaleLinear().domain(k.range()),c.scaleLinear().domain(i(l.range())))},q=function(b){var d=c.scaleLinear().domain(k.domain());return"x"===a?b.map(d.invert):"xy"===a?[d.invert(b[0][0]),d.invert(b[1][0])]:void 0},r=function(b){var d=c.scaleLinear().domain(i(l.domain()));return"y"===a?[b[1],b[0]].map(d.invert):"xy"===a?[d.invert(b[1][1]),d.invert(b[0][1])]:void 0},s=function(a){if(!(a.sourceEvent&&"draw"===a.sourceEvent.type))if(a.selection){var b=p(a.selection);j.call(a.type,{},{selection:b,xDomain:q(b),yDomain:r(b)})}else j.call(a.type,{},{})},t=function(a){a.each(function(a,c,d){g.extent([[k.range()[0],l.range()[1]],[k.range()[1],l.range()[0]]]),g.on("end",function(){return s(b.event)}).on("brush",function(){return s(b.event)}).on("start",function(){return s(b.event)});var e=m(b.select(d[c]),[a]);e.call(g).call(g.move,a?o(a):null)})};return t.xScale=function(){return arguments.length?(k=0>=arguments.length?void 0:arguments[0],t):k},t.yScale=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],t):l},e.rebind(t,j,"on"),e.rebind(t,g,"filter","handleSize"),t};a.brush=function(){return j("xy")},a.brushX=function(){return j("x")},a.brushY=function(){return j("y")},Object.defineProperty(a,"__esModule",{value:!0})}); | ||
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("d3-selection"),require("d3-scale"),require("d3-dispatch"),require("@d3fc/d3fc-rebind"),require("@d3fc/d3fc-data-join"),require("d3-brush")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-scale","d3-dispatch","@d3fc/d3fc-rebind","@d3fc/d3fc-data-join","d3-brush"],b):(a="undefined"==typeof globalThis?a||self:globalThis,b(a.fc=a.fc||{},a.d3,a.d3,a.d3,a.fc,a.fc,a.d3))})(this,function(a,b,c,d,e,f,g){'use strict';var h=function(a){return"x"===a?g.brushX():"y"===a?g.brushY():"xy"===a?g.brush():void 0},i=function(a){return[a[1],a[0]]},j=function(a){var g=h(a),j=d.dispatch("brush","start","end"),k=c.scaleIdentity(),l=c.scaleIdentity(),m=f.dataJoin("g","brush"),n=function(b,c,d){return"x"===a?b.map(c):"y"===a?b.map(d):"xy"===a?[[c(b[0][0]),d(b[0][1])],[c(b[1][0]),d(b[1][1])]]:void 0},o=function(a){return n(a,c.scaleLinear().domain(k.range()).invert,c.scaleLinear().domain(i(l.range())).invert)},p=function(a){return n(a,c.scaleLinear().domain(k.range()),c.scaleLinear().domain(i(l.range())))},q=function(b){var d=c.scaleLinear().domain(k.domain());return"x"===a?b.map(d.invert):"xy"===a?[d.invert(b[0][0]),d.invert(b[1][0])]:void 0},r=function(b){var d=c.scaleLinear().domain(i(l.domain()));return"y"===a?[b[1],b[0]].map(d.invert):"xy"===a?[d.invert(b[1][1]),d.invert(b[0][1])]:void 0},s=function(a){if(!(a.sourceEvent&&"draw"===a.sourceEvent.type))if(a.selection){var b=p(a.selection);j.call(a.type,{},{selection:b,xDomain:q(b),yDomain:r(b)})}else j.call(a.type,{},{})},t=function(a){a.each(function(a,c,d){g.extent([[k.range()[0],l.range()[1]],[k.range()[1],l.range()[0]]]),g.on("end",function(){return s(b.event)}).on("brush",function(){return s(b.event)}).on("start",function(){return s(b.event)});var e=m(b.select(d[c]),[a]);e.call(g).call(g.move,a?o(a):null)})};return t.xScale=function(){return arguments.length?(k=0>=arguments.length?void 0:arguments[0],t):k},t.yScale=function(){return arguments.length?(l=0>=arguments.length?void 0:arguments[0],t):l},e.rebind(t,j,"on"),e.rebind(t,g,"filter","handleSize"),t};a.brush=function(){return j("xy")},a.brushX=function(){return j("x")},a.brushY=function(){return j("y")},Object.defineProperty(a,"__esModule",{value:!0})}); |
@@ -6,2 +6,10 @@ # Change Log | ||
## [3.0.2](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-brush@3.0.1...@d3fc/d3fc-brush@3.0.2) (2020-09-16) | ||
**Note:** Version bump only for package @d3fc/d3fc-brush | ||
## 3.0.1 (2020-07-14) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@d3fc/d3fc-brush", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Adapts the D3 brush, making it easier to create data-driven brushed charts.", | ||
@@ -23,3 +23,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@d3fc/d3fc-data-join": "^6.0.1", | ||
"@d3fc/d3fc-data-join": "^6.0.2", | ||
"@d3fc/d3fc-rebind": "^6.0.1" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "3c6890b82dbb430bafd52420c0dd506861f16f5d" | ||
"gitHead": "03c76aba48931e9ab149cc11dcaabc93f2e9d0c1" | ||
} |
36950
Updated@d3fc/d3fc-data-join@^6.0.2