BC uses same state names as SAC
This commit is contained in:
parent
6ef15c73e0
commit
dded4cbafc
|
@ -62,7 +62,7 @@ var BarChart = React.createClass({
|
||||||
item: (_.isEqual(newProps.items, this.props.items)
|
item: (_.isEqual(newProps.items, this.props.items)
|
||||||
? this.state.item
|
? this.state.item
|
||||||
: newProps.items[0]),
|
: newProps.items[0]),
|
||||||
state: 'newProps'
|
state: 'loadingData'
|
||||||
}, this.fetchData);
|
}, this.fetchData);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ var BarChart = React.createClass({
|
||||||
if (!newState.canvasWidth) {
|
if (!newState.canvasWidth) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (newState.state !== 'newPoints') {
|
if (newState.state !== 'pleaseRender') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -80,12 +80,12 @@ var BarChart = React.createClass({
|
||||||
if (thing === 'item' && this.props.items[i] !== this.state.item) {
|
if (thing === 'item' && this.props.items[i] !== this.state.item) {
|
||||||
this.setState({
|
this.setState({
|
||||||
item: this.props.items[i],
|
item: this.props.items[i],
|
||||||
state: 'newProps'
|
state: 'loadingData'
|
||||||
}, this.fetchData);
|
}, this.fetchData);
|
||||||
} else if (thing === 'sort' && this.sorts[i] !== this.state.sort) {
|
} else if (thing === 'sort' && this.sorts[i] !== this.state.sort) {
|
||||||
this.setState({
|
this.setState({
|
||||||
sort: this.sorts[i],
|
sort: this.sorts[i],
|
||||||
state: 'newProps'
|
state: 'loadingData'
|
||||||
}, this.handleNewData);
|
}, this.handleNewData);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -109,7 +109,7 @@ var BarChart = React.createClass({
|
||||||
points: points,
|
points: points,
|
||||||
min: _.min(points, this.state.sort)[this.state.sort],
|
min: _.min(points, this.state.sort)[this.state.sort],
|
||||||
max: _.max(points, this.state.sort)[this.state.sort],
|
max: _.max(points, this.state.sort)[this.state.sort],
|
||||||
state: 'newPoints'
|
state: 'pleaseRender'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue