Skip to content

Commit

Permalink
feat(core): remove SmartMotion component in favor of react-spring bui…
Browse files Browse the repository at this point in the history
…lt-in support for various interpolators
  • Loading branch information
plouc committed Jun 21, 2020
1 parent b08c691 commit 1517720
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 119 deletions.
2 changes: 0 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
"d3-color": "^1.2.3",
"d3-format": "^1.4.4",
"d3-hierarchy": "^1.1.8",
"d3-interpolate": "^1.3.2",
"d3-scale": "^3.0.0",
"d3-scale-chromatic": "^1.3.3",
"d3-shape": "^1.3.5",
"d3-time-format": "^2.1.3",
"lodash": "^4.17.11",
"react-measure": "^2.2.4",
"react-motion": "^0.5.2",
"react-spring": "^8.0.27",
"recompose": "^0.30.0"
},
Expand Down
14 changes: 1 addition & 13 deletions packages/core/src/hocs/withMotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import partialRight from 'lodash/partialRight'
import compose from 'recompose/compose'
import defaultProps from 'recompose/defaultProps'
import withPropsOnChange from 'recompose/withPropsOnChange'
import setPropTypes from 'recompose/setPropTypes'
import { spring } from 'react-motion'
import { motionPropTypes } from '../motion'
import { defaultAnimate, defaultMotionDamping, defaultMotionStiffness } from '../defaults'

Expand All @@ -22,14 +19,5 @@ export default () =>
animate: defaultAnimate,
motionDamping: defaultMotionDamping,
motionStiffness: defaultMotionStiffness,
}),
withPropsOnChange(
['motionDamping', 'motionStiffness'],
({ motionDamping, motionStiffness }) => ({
boundSpring: partialRight(spring, {
damping: motionDamping,
stiffness: motionStiffness,
}),
})
)
})
)
102 changes: 0 additions & 102 deletions packages/core/src/motion/SmartMotion.js

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/src/motion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
export { default as SmartMotion } from './SmartMotion'
export * from './context'
export * from './hooks'
2 changes: 1 addition & 1 deletion website/src/pages/sankey/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const initialProperties = {
},

animate: SankeyDefaultProps.animate,
motionConfig: 'wobbly', // SankeyDefaultProps.motionConfig,
motionConfig: SankeyDefaultProps.motionConfig,

isInteractive: SankeyDefaultProps.isInteractive,

Expand Down

0 comments on commit 1517720

Please sign in to comment.