Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #419 from FormidableLabs/bug-animation
Browse files Browse the repository at this point in the history
don't animate data accessors
  • Loading branch information
boygirl authored Dec 8, 2016
2 parents 230f2e7 + cd97b03 commit 2e1d78d
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 22 deletions.
5 changes: 1 addition & 4 deletions src/components/victory-area/victory-area.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,7 @@ class VictoryArea extends React.Component {
const { animate, style, standalone, theme } = props;

if (this.shouldAnimate()) {
const whitelist = [
"data", "domain", "height", "padding", "style", "width",
"x", "y"
];
const whitelist = ["data", "domain", "height", "padding", "style", "width"];
return (
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
{React.createElement(this.constructor, props)}
Expand Down
7 changes: 2 additions & 5 deletions src/components/victory-bar/victory-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,9 @@ class VictoryBar extends React.Component {
const props = Helpers.modifyProps((this.props), fallbackProps, role);
const { animate, style, standalone, theme } = props;
if (this.shouldAnimate()) {
const animationWhitelist = [
"data", "domain", "height", "padding", "style", "width"
];

const whitelist = ["data", "domain", "height", "padding", "style", "width"];
return (
<VictoryTransition animate={animate} animationWhitelist={animationWhitelist}>
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
{React.createElement(this.constructor, props)}
</VictoryTransition>
);
Expand Down
3 changes: 1 addition & 2 deletions src/components/victory-candlestick/victory-candlestick.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ class VictoryCandlestick extends React.Component {
// make sense to tween. In the future, allow customization of animated
// prop whitelist/blacklist?
const whitelist = [
"data", "domain", "height", "padding", "samples", "size",
"style", "width", "x", "y"
"data", "domain", "height", "padding", "samples", "size", "style", "width"
];
return (
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/victory-errorbar/victory-errorbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class VictoryErrorBar extends React.Component {
// prop whitelist/blacklist?
const whitelist = [
"data", "domain", "height", "padding", "samples",
"style", "width", "x", "y", "errorX", "errorY", "borderWidth"
"style", "width", "errorX", "errorY", "borderWidth"
];
return (
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
Expand Down
5 changes: 1 addition & 4 deletions src/components/victory-line/victory-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,7 @@ class VictoryLine extends React.Component {
// make sense to tween. In the future, allow customization of animated
// prop whitelist/blacklist?
// TODO: extract into helper
const whitelist = [
"data", "domain", "height", "padding", "samples",
"style", "width", "x", "y"
];
const whitelist = ["data", "domain", "height", "padding", "samples", "style", "width"];
return (
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
{React.createElement(this.constructor, props)}
Expand Down
3 changes: 1 addition & 2 deletions src/components/victory-scatter/victory-scatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ class VictoryScatter extends React.Component {

if (this.shouldAnimate()) {
const whitelist = [
"data", "domain", "height", "maxBubbleSize", "padding", "samples", "size",
"style", "width", "x", "y"
"data", "domain", "height", "maxBubbleSize", "padding", "samples", "size", "style", "width"
];
return (
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ class VictoryVoronoiTooltip extends React.Component {
// make sense to tween. In the future, allow customization of animated
// prop whitelist/blacklist?
const whitelist = [
"data", "domain", "height", "padding", "samples", "size",
"style", "width", "x", "y"
"data", "domain", "height", "padding", "samples", "size", "style", "width"
];
return (
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
Expand Down
3 changes: 1 addition & 2 deletions src/components/victory-voronoi/victory-voronoi.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ class VictoryVoronoi extends React.Component {
// make sense to tween. In the future, allow customization of animated
// prop whitelist/blacklist?
const whitelist = [
"data", "domain", "height", "padding", "samples", "size",
"style", "width", "x", "y"
"data", "domain", "height", "padding", "samples", "size", "style", "width"
];
return (
<VictoryTransition animate={animate} animationWhitelist={whitelist}>
Expand Down

0 comments on commit 2e1d78d

Please sign in to comment.