// jshint esversion: 6 import React from "react"; import _ from "lodash"; import { Button, AnchorButton, Tooltip } from "@blueprintjs/core"; import { connect } from "react-redux"; import * as globals from "../../globals"; import actions from "../../actions"; import CellSetButton from "./cellSetButtons"; @connect(state => ({ differential: state.differential, world: state.controls.world, crossfilter: state.controls.crossfilter, selectionUpdate: _.get(state.controls, "crossfilter.updateTime", null) })) class Expression extends React.Component { constructor(props) { super(props); this.state = {}; } computeDiffExp() { const { dispatch, differential } = this.props; if (differential.celllist1 && differential.celllist2) { dispatch( actions.requestDifferentialExpression( differential.celllist1, differential.celllist2 ) ); } } clearDifferentialExpression() { const { dispatch, differential } = this.props; dispatch({ type: "clear differential expression", diffExp: differential.diffExp }); dispatch({ type: "clear scatterplot" }); } render() { const { differential } = this.props; if (!differential) { return null; } const haveBothCellSets = !!differential.celllist1 && !!differential.celllist2; return (