From 482d3946b30ca3a205832b0981ce12359cc3ea9a Mon Sep 17 00:00:00 2001 From: Jake Zatecky Date: Sun, 25 Feb 2024 12:38:47 -0500 Subject: [PATCH] Minor cleanup --- src/d3-funnel/D3Funnel.js | 10 +++++----- webpack.config.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/d3-funnel/D3Funnel.js b/src/d3-funnel/D3Funnel.js index 5116167..ddc271f 100644 --- a/src/d3-funnel/D3Funnel.js +++ b/src/d3-funnel/D3Funnel.js @@ -546,7 +546,7 @@ class D3Funnel { } else { // Revert velocity back to the initial if we are using // static heights (prevents zero velocity if isInverted - // and bottomPinch are non trivial and dynamicHeight is + // and bottomPinch are non-trivial and dynamicHeight is // false) if (!this.settings.dynamicHeight) { ({ dx } = this); @@ -895,8 +895,8 @@ class D3Funnel { addBeforeTransition(path, index, isOverlay) { const paths = isOverlay ? this.overlayPaths[index] : this.blockPaths[index]; - let beforePath = ''; - let beforeFill = ''; + let beforePath; + let beforeFill; // Construct the top of the trapezoid and leave the other elements // hovering around to expand downward on animation @@ -919,11 +919,11 @@ class D3Funnel { ]); } - // Use previous fill color, if available if (this.settings.fillType === 'solid' && index > 0) { + // Use previous fill color, if available beforeFill = this.blocks[index - 1].fill.actual; - // Otherwise use current background } else { + // Otherwise use current background beforeFill = this.blocks[index].fill.actual; } diff --git a/webpack.config.js b/webpack.config.js index 55ea2e9..c7aec6e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -34,7 +34,7 @@ function makeConfig({ target }) { }, }, resolve: { - extensions: ['.js', '.jsx'], + extensions: ['.js'], }, externals: [ {