update design build

This commit is contained in:
Eric Hulburd
2016-03-05 16:53:29 -06:00
parent 43a9daf94e
commit d7af1fc2b2
20 changed files with 172 additions and 149 deletions

View File

@@ -6,11 +6,6 @@ import SplineStackChart from './../../../d3/line/spline_stack';
class GraphComponent extends React.Component {
componentDidMount(){
var power_graph = this;
power_graph.updateGraph();
}
get house(){
return this.state_manager.state.house;
}
@@ -19,6 +14,11 @@ class GraphComponent extends React.Component {
return this.props.state_manager;
}
componentDidMount(){
var power_graph = this;
power_graph.updateGraph();
}
componentDidUpdate(prev_props, prev_state){
var power_graph = this;
if (prev_props.house != power_graph.props.house || prev_props.power_range != power_graph.props.power_range){
@@ -84,4 +84,6 @@ class GraphComponent extends React.Component {
}
GraphComponent.NAME = 'PowerGraph';
module.exports = GraphComponent;