@d3fc/d3fc-data-join
Advanced tools
Comparing version 6.0.1 to 6.0.2
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.fc = global.fc || {})); | ||
}(this, function (exports) { 'use strict'; | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fc = global.fc || {})); | ||
}(this, (function (exports) { 'use strict'; | ||
@@ -116,2 +116,2 @@ // "Caution: avoid interpolating to or from the number zero when the interpolator is used to generate | ||
})); | ||
}))); |
@@ -1,1 +0,1 @@ | ||
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a=a||self,b(a.fc=a.fc||{}))})(this,function(a){'use strict';var b=1e-6;a.dataJoin=function(a,c){a=a||"g";var d=function(a,b){return b},e=null,f=function(f,g){g=g||function(a){return a};var h=f.selection?f:null;h&&(f=f.selection());var i=f.selectAll(function(a,b,c){return Array.from(c[b].childNodes).filter(function(a){return 1===a.nodeType})}).filter(null==c?a:"".concat(a,".").concat(c)),j=i.data(g,d),k=j.enter().append(a).attr("class",c),l=j.exit();j=j.merge(k);var m=h||e;return m&&(j=j.transition(m).style("opacity",1),k.style("opacity",b),l=l.transition(m).style("opacity",b)),l.remove(),j.enter=function(){return k},j.exit=function(){return l},j};return f.element=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],f):a},f.className=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],f):c},f.key=function(){return arguments.length?(d=0>=arguments.length?void 0:arguments[0],f):d},f.transition=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],f):e},f},a.effectivelyZero=b,Object.defineProperty(a,"__esModule",{value:!0})}); | ||
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports):"function"==typeof define&&define.amd?define(["exports"],b):(a="undefined"==typeof globalThis?a||self:globalThis,b(a.fc=a.fc||{}))})(this,function(a){'use strict';var b=1e-6;a.dataJoin=function(a,c){a=a||"g";var d=function(a,b){return b},e=null,f=function(f,g){g=g||function(a){return a};var h=f.selection?f:null;h&&(f=f.selection());var i=f.selectAll(function(a,b,c){return Array.from(c[b].childNodes).filter(function(a){return 1===a.nodeType})}).filter(null==c?a:"".concat(a,".").concat(c)),j=i.data(g,d),k=j.enter().append(a).attr("class",c),l=j.exit();j=j.merge(k);var m=h||e;return m&&(j=j.transition(m).style("opacity",1),k.style("opacity",b),l=l.transition(m).style("opacity",b)),l.remove(),j.enter=function(){return k},j.exit=function(){return l},j};return f.element=function(){return arguments.length?(a=0>=arguments.length?void 0:arguments[0],f):a},f.className=function(){return arguments.length?(c=0>=arguments.length?void 0:arguments[0],f):c},f.key=function(){return arguments.length?(d=0>=arguments.length?void 0:arguments[0],f):d},f.transition=function(){return arguments.length?(e=0>=arguments.length?void 0:arguments[0],f):e},f},a.effectivelyZero=b,Object.defineProperty(a,"__esModule",{value:!0})}); |
@@ -6,2 +6,10 @@ # Change Log | ||
## [6.0.2](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-data-join@6.0.1...@d3fc/d3fc-data-join@6.0.2) (2020-09-16) | ||
**Note:** Version bump only for package @d3fc/d3fc-data-join | ||
## 6.0.1 (2020-07-14) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@d3fc/d3fc-data-join", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "A component that simplifies the D3 data join and supports the d3fc decorate pattern", | ||
@@ -28,3 +28,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "3c6890b82dbb430bafd52420c0dd506861f16f5d" | ||
"gitHead": "03c76aba48931e9ab149cc11dcaabc93f2e9d0c1" | ||
} |
import { select, selection } from 'd3-selection'; | ||
import { transition } from 'd3-transition'; | ||
import 'd3-transition'; | ||
import { easeLinear } from 'd3-ease'; | ||
@@ -172,16 +172,15 @@ import dataJoin from '../src/dataJoin'; | ||
// TODO: investigate why this had to be disabled | ||
// it('should return the untransitioned exit selection', () => { | ||
// container.selection() | ||
// .append('g') | ||
// .style('opacity', '1'); | ||
// const update = join(container, []); | ||
it('should return the untransitioned exit selection', () => { | ||
container.selection() | ||
.append('g') | ||
.style('opacity', '1'); | ||
const update = join(container, []); | ||
// update.exit() | ||
// .remove(); | ||
update.exit() | ||
.remove(); | ||
// const node = update.exit().node(); | ||
// expect(node.style.opacity).toBe('1'); | ||
// expect(node.parentNode).toBe(null); | ||
// }); | ||
const node = update.exit().node(); | ||
expect(node.style.opacity).toBe('1'); | ||
expect(node.parentNode).not.toBe(null); | ||
}); | ||
@@ -216,5 +215,9 @@ it('should allow the transition to be disabled', () => { | ||
it('should use implicit rather than explicit transition', (done) => { | ||
join.transition(transition().duration(timeout * 10).ease(easeLinear)); | ||
container = container.selection(); | ||
const explicit = container | ||
.transition() | ||
.duration(timeout * 10) | ||
.ease(easeLinear); | ||
join.transition(explicit); | ||
const update = join(container, data); | ||
@@ -227,3 +230,3 @@ const node = update.enter().node(); | ||
setTimeout(() => { | ||
expect(node.style.opacity).not.toBe('1'); | ||
expect(node.style.opacity).toBe('1'); | ||
expect(node.parentNode).not.toBe(null); | ||
@@ -230,0 +233,0 @@ done(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27311
405