From c517a6cf5dc30a62321c0557cfb3e927f77fa737 Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Thu, 17 Mar 2016 18:11:53 +0100 Subject: [PATCH] Downgrade react-motion * caused lots of lag when dev tools were open --- client/app/scripts/charts/edge.js | 2 +- client/app/scripts/charts/node.js | 2 +- client/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/app/scripts/charts/edge.js b/client/app/scripts/charts/edge.js index 2ff2b1438..9d462b3fd 100644 --- a/client/app/scripts/charts/edge.js +++ b/client/app/scripts/charts/edge.js @@ -10,7 +10,7 @@ const line = d3.svg.line() .x(d => d.x) .y(d => d.y); -const animConfig = {stiffness: 80, damping: 20}; +const animConfig = [80, 20]; // stiffness, damping const flattenPoints = points => { const flattened = {}; diff --git a/client/app/scripts/charts/node.js b/client/app/scripts/charts/node.js index 5ad277cff..b08b57ae9 100644 --- a/client/app/scripts/charts/node.js +++ b/client/app/scripts/charts/node.js @@ -59,7 +59,7 @@ export default class Node extends React.Component { const onMouseLeave = this.handleMouseLeave; const onMouseClick = this.handleMouseClick; const classNames = ['node']; - const animConfig = {stiffness: 80, damping: 20}; + const animConfig = [80, 20]; // stiffness, damping const label = this.ellipsis(props.label, 14, nodeScale(4 * scaleFactor)); const subLabel = this.ellipsis(props.subLabel, 12, nodeScale(4 * scaleFactor)); let labelFontSize = 14; diff --git a/client/package.json b/client/package.json index eb65ddaee..a32a4b084 100644 --- a/client/package.json +++ b/client/package.json @@ -24,7 +24,7 @@ "react-addons-transition-group": "^0.14.7", "react-addons-update": "^0.14.7", "react-dom": "^0.14.7", - "react-motion": "0.4.2", + "react-motion": "0.3.1", "reqwest": "~2.0.5", "timely": "0.1.0" },