From 5140020c08efb0498fc4a20302a321c4e3e13dd7 Mon Sep 17 00:00:00 2001
From: Colin Megill
Date: Fri, 5 Jan 2018 17:16:14 -0800
Subject: [PATCH] paintbrush and intialize
---
src/actions/index.js | 2 +-
src/components/app.js | 17 ++++++++++++++++-
src/components/categorical/categorical.js | 7 ++++---
src/components/continuous/continuous.js | 3 ---
src/components/continuous/drawAxes.js | 3 +--
src/components/expression/expression.js | 18 ++++++++----------
src/reducers/controls.js | 2 +-
7 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/src/actions/index.js b/src/actions/index.js
index c1e02f31..8e9d01d9 100644
--- a/src/actions/index.js
+++ b/src/actions/index.js
@@ -61,7 +61,7 @@ const attemptCategoricalMetadataDeselection = (metadataField, value) => {
const initialize = () => {
return (dispatch, getState) => {
dispatch({type: "initialize started"})
- fetch(`${globals.API.prefix}${globals.API.version}cells`, {
+ fetch(`${globals.API.prefix}${globals.API.version}initialize`, {
method: "get",
headers: new Headers({
'Content-Type': 'application/json'
diff --git a/src/components/app.js b/src/components/app.js
index 13d2277f..78cf9cb2 100644
--- a/src/components/app.js
+++ b/src/components/app.js
@@ -43,7 +43,7 @@ class App extends React.Component {
first request includes query straight off the url bar for now
*/
this.props.dispatch(actions.requestCells(window.location.search))
- this.props.dispatch(actions.___hardcoded___requestGeneExpressionCountsPOST(window.location.search))
+ // this.props.dispatch(actions.___hardcoded___requestGeneExpressionCountsPOST(window.location.search))
}
render() {
@@ -69,6 +69,21 @@ class App extends React.Component {
+
diff --git a/src/components/categorical/categorical.js b/src/components/categorical/categorical.js
index bb7d930d..e37560ba 100644
--- a/src/components/categorical/categorical.js
+++ b/src/components/categorical/categorical.js
@@ -46,13 +46,13 @@ class Category extends React.Component {
- 🎨
+ 🖌️
+
{
_.map(this.props.ranges, (value, key) => {
const isColorField = key.includes("color") || key.includes("Color");
diff --git a/src/components/continuous/continuous.js b/src/components/continuous/continuous.js
index 1f431750..d091a0a6 100644
--- a/src/components/continuous/continuous.js
+++ b/src/components/continuous/continuous.js
@@ -22,13 +22,11 @@ import {
const metadata = state.cells.cells && state.cells.cells.data.metadata ? state.cells.cells.data.metadata : null;
const initializeRanges = state.initialize.data && state.initialize.data.data.ranges ? state.initialize.data.data.ranges : null;
- const initializeMetadata = state.initialize.data && state.initialize.data.data.metadata ? state.initialize.data.data.metadata : null;
return {
ranges,
metadata,
initializeRanges,
- initializeMetadata,
colorAccessor: state.controls.colorAccessor,
colorScale: state.controls.colorScale,
graphBrushSelection: state.controls.graphBrushSelection,
@@ -74,7 +72,6 @@ class Continuous extends React.Component {
this.state.svg,
this.state.ctx,
dimensions,
- nextProps.initializeMetadata, /* PERF this means brushes are always filtering on everything */
xscale,
height,
width,
diff --git a/src/components/continuous/drawAxes.js b/src/components/continuous/drawAxes.js
index 8003b8f5..c063c604 100644
--- a/src/components/continuous/drawAxes.js
+++ b/src/components/continuous/drawAxes.js
@@ -9,7 +9,6 @@ const drawAxes = (
svg,
ctx,
dimensions,
- metadata,
xscale,
height,
width,
@@ -56,7 +55,7 @@ const drawAxes = (
.on("click", (d) => { handleColorAction(d.key) })
.attr("class", styles.title)
.attr("text-anchor", "start")
- .text(function(d) { return "description" in d ? d.description + " 🎨" : d.key + " 🎨"; });
+ .text(function(d) { return "description" in d ? d.description + " 🖌️" : d.key + " 🖌️"; });
// Add and store a brush for each axis.
axes.append("g")
diff --git a/src/components/expression/expression.js b/src/components/expression/expression.js
index 0484d92a..3ed1556a 100644
--- a/src/components/expression/expression.js
+++ b/src/components/expression/expression.js
@@ -66,12 +66,12 @@ class DiffExp extends React.Component {
🎨
+ top: 2,
+ marginRight: 6
+ }}>🖌️
{gene}
🎨
+ top: 2,
+ marginRight: 6
+ }}>🖌️
{gene}
{
return {
- expression: state.expression.data,
currentCellSelection: state.controls.currentCellSelection,
differential: state.differential
}
@@ -208,7 +207,6 @@ class Expression extends React.Component {
}
render () {
if (
- !this.props.expression ||
!this.props.differential
) {
return null
diff --git a/src/reducers/controls.js b/src/reducers/controls.js
index 590065fb..423c8648 100644
--- a/src/reducers/controls.js
+++ b/src/reducers/controls.js
@@ -12,7 +12,7 @@ const Controls = (state = {
continuousSelection: null,
axesHaveBeenDrawn: false,
__storedStateForCelllist1__: null, /* will need procedural control of brush ie., brush.extent https://bl.ocks.org/micahstubbs/3cda05ca68cba260cb81 */
- __storedStateForCelllist1__: null,
+ __storedStateForCelllist2__: null,
}, action) => {
switch (action.type) {
/**********************************