first pass four corners layout

This commit is contained in:
Colin Megill
2018-05-10 00:46:30 -07:00
parent b097c32fee
commit a803601793
6 changed files with 116 additions and 108 deletions
-3
View File
@@ -8,7 +8,6 @@ import PulseLoader from "halogen/PulseLoader";
import LeftSideBar from "./leftsidebar"; import LeftSideBar from "./leftsidebar";
import Parallel from "./continuous/parallel"; import Parallel from "./continuous/parallel";
import DynamicScatterplot from "./scatterplot/scatterplot";
import Joy from "./joy/joy"; import Joy from "./joy/joy";
import Graph from "./graph/graph"; import Graph from "./graph/graph";
import * as globals from "../globals"; import * as globals from "../globals";
@@ -71,13 +70,11 @@ class App extends React.Component {
<div <div
style={{ style={{
padding: 15, padding: 15,
backgroundColor: "#F7F7F7",
width: 1440 - 410 /* but responsive */, width: 1440 - 410 /* but responsive */,
marginLeft: 350 /* but responsive */ marginLeft: 350 /* but responsive */
}} }}
> >
<Graph /> <Graph />
<DynamicScatterplot />
{/*<Parallel/>*/} {/*<Parallel/>*/}
</div> </div>
</div> </div>
@@ -30,6 +30,7 @@ class CellSetButton extends React.Component {
<button <button
style={{ style={{
color: "#FFF", color: "#FFF",
borderRadius: 2,
padding: "0px 10px", padding: "0px 10px",
height: 30, height: 30,
backgroundColor: globals.brightBlue, backgroundColor: globals.brightBlue,
@@ -40,7 +40,7 @@ class Expression extends React.Component {
return ( return (
<div> <div>
<div style={{ margin: 10 }}> <div style={{ margin: 10 }}>
<div style={{ marginBottom: 10, width: 300 }}> <div style={{ marginBottom: 15, width: 300 }}>
There are currently There are currently
{" " + {" " +
_.filter(this.props.currentCellSelection, "__selected__").length + _.filter(this.props.currentCellSelection, "__selected__").length +
+97 -91
View File
@@ -204,117 +204,111 @@ class Graph extends React.Component {
<div <div
id="graphWrapper" id="graphWrapper"
style={{ style={{
height: 1050 /* move this to globals */, height: 1050 /* move this to globals */
backgroundColor: "white",
borderRadius: 3,
boxShadow: "3px 4px 13px 0px rgba(201,201,201,1)"
}} }}
> >
<div <div style={{ position: "fixed", right: 0, top: 0 }}>
style={{ <div
padding: 10,
display: "flex",
justifyContent: "space-between",
alignItems: "baseline"
}}
>
<button
onClick={() => {
this.props.dispatch(actions.regraph());
}}
style={{ style={{
fontSize: 12, padding: 10,
fontWeight: 400, display: "flex",
color: "white", justifyContent: "flex-end",
padding: "10px 20px", alignItems: "baseline"
backgroundColor: globals.brightBlue,
border: "none",
cursor: "pointer"
}} }}
> >
Regraph present selection
</button>
<div>
<span style={{ marginRight: 10, fontSize: 12 }}>
deselected opacity
</span>
<input
style={{ position: "relative", top: 6, marginRight: 20 }}
type="range"
onChange={this.handleOpacityRangeChange.bind(this)}
min={0}
max={1}
step="0.01"
/>
<span style={{ position: "relative", top: 3 }}>
<button
onClick={() => {
this.setState({ mode: "brush" });
}}
style={{
cursor: "pointer",
border:
this.state.mode === "brush"
? "1px solid black"
: "1px solid white",
backgroundColor: "white",
padding: 5,
borderRadius: 3
}}
>
{" "}
<FaCrosshair />{" "}
</button>
<button
onClick={() => {
this.setState({ mode: "zoom" });
}}
style={{
cursor: "pointer",
border:
this.state.mode === "zoom"
? "1px solid black"
: "1px solid white",
backgroundColor: "white",
padding: 5,
borderRadius: 3
}}
>
{" "}
<FaZoom />{" "}
</button>
</span>
</div>
<div>
<button <button
onClick={() => {
this.props.dispatch(actions.regraph());
}}
style={{ style={{
fontSize: 12, fontSize: 14,
fontWeight: 400, fontWeight: 700,
color: "white", color: "white",
padding: "10px 20px", padding: "10px 20px",
marginRight: 10,
borderRadius: 2,
backgroundColor: globals.brightBlue, backgroundColor: globals.brightBlue,
border: "none", border: "none",
cursor: "pointer" cursor: "pointer"
}} }}
> >
{" "} regraph selection
<FaSave style={{ display: "inline-block" }} /> csv url for present
selection{" "}
</button> </button>
<div>
<span style={{ position: "relative", top: 3 }}>
<button
onClick={() => {
this.setState({ mode: "brush" });
}}
style={{
cursor: "pointer",
border:
this.state.mode === "brush"
? "1px solid black"
: "1px solid white",
backgroundColor: "white",
padding: 5,
borderRadius: 3
}}
>
{" "}
<FaCrosshair />{" "}
</button>
<button
onClick={() => {
this.setState({ mode: "zoom" });
}}
style={{
cursor: "pointer",
border:
this.state.mode === "zoom"
? "1px solid black"
: "1px solid white",
backgroundColor: "white",
padding: 5,
borderRadius: 3
}}
>
{" "}
<FaZoom />{" "}
</button>
</span>
</div>
<div>
<button
style={{
fontSize: 14,
fontWeight: 700,
color: "white",
padding: "10px 20px",
backgroundColor: globals.lightGrey,
border: "none",
cursor: "pointer"
}}
>
export
</button>
</div>
</div> </div>
</div> </div>
<div <div
style={{ display: this.state.mode === "brush" ? "inherit" : "none" }} style={{ position: "fixed", right: 80, bottom: 50, zIndex: -9999 }}
id="graphAttachPoint" >
/> <div
<div style={{ padding: 0, margin: 0 }}> style={{
<canvas display: this.state.mode === "brush" ? "inherit" : "none"
width={globals.graphWidth}
height={globals.graphHeight}
ref={canvas => {
this.reglCanvas = canvas;
}} }}
id="graphAttachPoint"
/> />
<div style={{ padding: 0, margin: 0 }}>
<canvas
width={globals.graphWidth}
height={globals.graphHeight}
ref={canvas => {
this.reglCanvas = canvas;
}}
/>
</div>
</div> </div>
</div> </div>
); );
@@ -322,3 +316,15 @@ class Graph extends React.Component {
} }
export default Graph; export default Graph;
// <span style={{ marginRight: 10, fontSize: 12 }}>
// deselected opacity
// </span>
// <input
// style={{ position: "relative", top: 6, marginRight: 20 }}
// type="range"
// onChange={this.handleOpacityRangeChange.bind(this)}
// min={0}
// max={1}
// step="0.01"
// />
+16 -9
View File
@@ -7,6 +7,7 @@ import ExpressionButtons from "./expression/expressionButtons";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Heatmap from "./expression/diffExpHeatmap"; import Heatmap from "./expression/diffExpHeatmap";
import * as globals from "../globals"; import * as globals from "../globals";
import DynamicScatterplot from "./scatterplot/scatterplot";
@connect(state => { @connect(state => {
return {}; return {};
@@ -21,7 +22,15 @@ class LeftSideBar extends React.Component {
render() { render() {
return ( return (
<div style={{ position: "fixed" }}> <div style={{ position: "fixed" }}>
<p style={{ margin: 10, fontSize: 16, fontWeight: 700, width: "100%" }}> <p
style={{
margin: 10,
fontSize: 24,
color: globals.lightGrey,
fontWeight: 700,
width: "100%"
}}
>
CELLxGENE {globals.datasetTitle}{" "} CELLxGENE {globals.datasetTitle}{" "}
</p> </p>
<div style={{ padding: 10 }}> <div style={{ padding: 10 }}>
@@ -97,7 +106,7 @@ class LeftSideBar extends React.Component {
height: 500, height: 500,
width: 350, width: 350,
padding: 10, padding: 10,
overflowY: "scroll", overflowY: "auto",
overflowX: "hidden" overflowX: "hidden"
}} }}
> >
@@ -105,13 +114,11 @@ class LeftSideBar extends React.Component {
{this.state.currentTab === "metadata" ? <Continuous /> : null} {this.state.currentTab === "metadata" ? <Continuous /> : null}
{this.state.currentTab === "expression" ? <Heatmap /> : null} {this.state.currentTab === "expression" ? <Heatmap /> : null}
</div> </div>
<div <div style={{ position: "fixed", bottom: 0, left: 0 }}>
style={{ {this.state.currentTab === "metadata" ? <ExpressionButtons /> : null}
boxShadow: "-3px -4px 13px 0px rgba(201,201,201,1)", {this.state.currentTab === "expression" ? (
paddingTop: 10 <DynamicScatterplot />
}} ) : null}
>
<ExpressionButtons />
</div> </div>
</div> </div>
); );
+1 -4
View File
@@ -265,10 +265,7 @@ class Scatterplot extends React.Component {
<div <div
style={{ style={{
backgroundColor: "white", backgroundColor: "white",
borderRadius: 3, paddingBottom: 20
marginTop: 15,
paddingBottom: 20,
boxShadow: "3px 4px 13px 0px rgba(201,201,201,1)"
}} }}
id="scatterplot_wrapper" id="scatterplot_wrapper"
> >