mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-29 12:58:11 +08:00
Add menu (#631)
* add menu * Added library versions to config and tests * add template version number
This commit is contained in:
@@ -5,7 +5,15 @@ import * as d3 from "d3";
|
||||
import { connect } from "react-redux";
|
||||
import mat4 from "gl-mat4";
|
||||
import _regl from "regl";
|
||||
import { Button, AnchorButton, Tooltip } from "@blueprintjs/core";
|
||||
import {
|
||||
Button,
|
||||
AnchorButton,
|
||||
Tooltip,
|
||||
Popover,
|
||||
Menu,
|
||||
MenuItem,
|
||||
Position
|
||||
} from "@blueprintjs/core";
|
||||
|
||||
import * as globals from "../../globals";
|
||||
import setupSVGandBrushElements from "./setupSVGandBrush";
|
||||
@@ -32,7 +40,8 @@ import { World } from "../../util/stateManager";
|
||||
scatterplotXXaccessor: state.controls.scatterplotXXaccessor,
|
||||
scatterplotYYaccessor: state.controls.scatterplotYYaccessor,
|
||||
celllist1: state.differential.celllist1,
|
||||
celllist2: state.differential.celllist2
|
||||
celllist2: state.differential.celllist2,
|
||||
library_versions: _.get(state.config, "library_versions", null)
|
||||
}))
|
||||
class Graph extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -415,9 +424,9 @@ class Graph extends React.Component {
|
||||
dispatch,
|
||||
responsive,
|
||||
crossfilter,
|
||||
resettingInterface
|
||||
resettingInterface,
|
||||
library_versions
|
||||
} = this.props;
|
||||
|
||||
const { mode } = this.state;
|
||||
return (
|
||||
<div id="graphWrapper">
|
||||
@@ -505,6 +514,56 @@ class Graph extends React.Component {
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ marginLeft: 10 }}>
|
||||
<Popover
|
||||
content={
|
||||
<Menu>
|
||||
<MenuItem
|
||||
href="https://chanzuckerberg.github.io/cellxgene/faq.html"
|
||||
target="_blank"
|
||||
icon="help"
|
||||
text="FAQ"
|
||||
/>
|
||||
<MenuItem
|
||||
href="https://join-cziscience-slack.herokuapp.com/"
|
||||
target="_blank"
|
||||
icon="chat"
|
||||
text="Chat"
|
||||
/>
|
||||
<MenuItem
|
||||
href="https://chanzuckerberg.github.io/cellxgene/"
|
||||
target="_blank"
|
||||
icon="book"
|
||||
text="Docs"
|
||||
/>
|
||||
<MenuItem
|
||||
href="https://github.com/chanzuckerberg/cellxgene"
|
||||
target="_blank"
|
||||
icon="git-branch"
|
||||
text="Github"
|
||||
/>
|
||||
<MenuItem
|
||||
target="_blank"
|
||||
text={`cellxgene v${
|
||||
library_versions && library_versions.cellxgene
|
||||
? library_versions.cellxgene
|
||||
: null
|
||||
}`}
|
||||
/>
|
||||
<MenuItem text="MIT License" />
|
||||
</Menu>
|
||||
}
|
||||
position={Position.BOTTOM_RIGHT}
|
||||
>
|
||||
<Button
|
||||
type="button"
|
||||
className="bp3-button bp3-icon-cog"
|
||||
style={{
|
||||
cursor: "pointer"
|
||||
}}
|
||||
/>
|
||||
</Popover>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user