select and deselect

This commit is contained in:
Colin Megill
2017-11-02 06:34:50 -07:00
parent 764f082d24
commit b5f068abf9
12 changed files with 134 additions and 90 deletions
+4 -3
View File
@@ -28,7 +28,7 @@ class Continuous extends React.Component {
super(props);
this.state = {
ctx: null,
parallelExists: false
};
}
@@ -36,9 +36,10 @@ class Continuous extends React.Component {
}
componentWillUpdate(nextProps) {
if (nextProps.ranges) {
componentWillReceiveProps(nextProps) {
if (nextProps.ranges && !this.state.parallelExists) {
drawParallelCoordinates(nextProps.metadata, nextProps.ranges)
this.setState({parallelExists: true})
}
}
@@ -22,8 +22,6 @@ const drawParallelCoordinates = (data, ranges) => {
const dimensions = createDimensions(ranges);
console.log('ranges', data)
const d3_functor = (v) => {
return typeof v === "function" ? v : function() { return v; };
};