more lint - components (#336)

* more lint

* fix typo introduced in delinting

* more lint

* remove dead code

* lint fixes

* lint
This commit is contained in:
Bruce Martin
2018-10-17 07:17:51 -07:00
committed by GitHub
parent 952578680a
commit f9f43c42c0
23 changed files with 494 additions and 586 deletions
+15 -14
View File
@@ -5,18 +5,16 @@ import React from "react";
import _ from "lodash";
import { connect } from "react-redux";
import HistogramBrush from "../brushableHistogram/";
import HistogramBrush from "../brushableHistogram";
@connect(state => {
return {
ranges: _.get(state.controls.world, "summary.obs", null),
metadata: _.get(state.controls.world, "obsAnnotations", null),
colorAccessor: state.controls.colorAccessor,
colorScale: state.controls.colorScale,
selectionUpdate: _.get(state.controls, "crossfilter.updateTime", null),
schema: _.get(state.controls.world, "schema", null)
};
})
@connect(state => ({
ranges: _.get(state.controls.world, "summary.obs", null),
metadata: _.get(state.controls.world, "obsAnnotations", null),
colorAccessor: state.controls.colorAccessor,
colorScale: state.controls.colorScale,
selectionUpdate: _.get(state.controls, "crossfilter.updateTime", null),
schema: _.get(state.controls.world, "schema", null)
}))
class Continuous extends React.Component {
constructor(props) {
super(props);
@@ -26,6 +24,8 @@ class Continuous extends React.Component {
this.state = {};
}
componentDidUpdate() {}
handleColorAction(key) {
return () => {
const { dispatch, ranges } = this.props;
@@ -40,9 +40,10 @@ class Continuous extends React.Component {
render() {
const { ranges, obsAnnotations, schema } = this.props;
if (schema && !this.continuousChecked) {
this.hasContinuous = _.some(schema.annotations.obs, d => {
return d.type === "int32" || d.type === "float32";
});
this.hasContinuous = _.some(
schema.annotations.obs,
d => d.type === "int32" || d.type === "float32"
);
this.continuousChecked = true; /* only do this once */
}