-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposal for D3 upgrade V4 version (#113)
* Fix scrollspy throttle issue * Fix new Scrollspy version * add * update to React 16 * fix testing * D3 V4 version
- Loading branch information
1 parent
90f8d30
commit 87569b6
Showing
18 changed files
with
200 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { | ||
curveLinear, | ||
curveStepBefore, | ||
curveStepAfter, | ||
curveBasis, | ||
curveBasisOpen, | ||
curveBasisClosed, | ||
curveBundle, | ||
curveCardinal, | ||
curveCardinalOpen, | ||
curveCardinalClosed, | ||
curveNatural | ||
} from 'd3'; | ||
|
||
const interpolate = (type) => { | ||
switch (type) { | ||
case 'stepBefore': | ||
return curveStepBefore; | ||
case 'stepAfter': | ||
return curveStepAfter; | ||
case 'basis': | ||
return curveBasis; | ||
case 'basisOpen': | ||
return curveBasisOpen; | ||
case 'basisClosed': | ||
return curveBasisClosed; | ||
case 'bundle': | ||
return curveBundle; | ||
case 'cardinal': | ||
return curveCardinal; | ||
case 'cardinalOpen': | ||
return curveCardinalOpen; | ||
case 'cardinalClosed': | ||
return curveCardinalClosed; | ||
case 'natural': | ||
return curveNatural; | ||
default: | ||
return curveLinear; | ||
} | ||
}; | ||
|
||
export default interpolate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.