mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-19 02:48:30 +08:00
dead canvas code cleanup
This commit is contained in:
@@ -64,7 +64,6 @@ class Scatterplot extends React.Component {
|
||||
componentDidMount() {
|
||||
const {
|
||||
svg
|
||||
// ctx
|
||||
} = setupScatterplot(
|
||||
width,
|
||||
height,
|
||||
@@ -72,7 +71,6 @@ class Scatterplot extends React.Component {
|
||||
);
|
||||
this.setState({
|
||||
svg
|
||||
// ctx
|
||||
})
|
||||
|
||||
const camera = _camera(this.reglCanvas, {scale: true, rotate: false});
|
||||
@@ -129,22 +127,6 @@ class Scatterplot extends React.Component {
|
||||
this.drawAxesSVG(this.state.xScale, this.state.yScale);
|
||||
}
|
||||
|
||||
// if (
|
||||
// this.state.xScale &&
|
||||
// this.state.yScale
|
||||
// ) {
|
||||
// drawScatterplotCanvas(
|
||||
// this.state.ctx,
|
||||
// this.state.xScale,
|
||||
// this.state.yScale,
|
||||
// this.props.currentCellSelection,
|
||||
// this.props.opacityForDeselectedCells,
|
||||
// this.props.expression,
|
||||
// this.props.scatterplotXXaccessor,
|
||||
// this.props.scatterplotYYaccessor,
|
||||
// )
|
||||
// }
|
||||
|
||||
if (
|
||||
this.state.regl &&
|
||||
this.state.pointBuffer &&
|
||||
@@ -211,9 +193,6 @@ class Scatterplot extends React.Component {
|
||||
this.state.pointBuffer(positions)
|
||||
this.state.colorBuffer(colors)
|
||||
this.state.sizeBuffer(sizes)
|
||||
// this.state.pointBuffer(generatePoints(count))
|
||||
// this.state.colorBuffer(generateColors(count))
|
||||
// this.state.sizeBuffer(generateSizes(count))
|
||||
this.count = positions.length
|
||||
}
|
||||
}
|
||||
@@ -304,7 +283,7 @@ class Scatterplot extends React.Component {
|
||||
width={width}
|
||||
height={height}
|
||||
style={{
|
||||
marginLeft: margin.left - 5,
|
||||
marginLeft: margin.left - 7,
|
||||
marginTop: margin.top
|
||||
}}
|
||||
ref={(canvas) => { this.reglCanvas = canvas}}/>
|
||||
|
||||
@@ -18,23 +18,9 @@ const setupScatterplot = (
|
||||
.append("g")
|
||||
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
|
||||
|
||||
// var canvas = container.append("canvas")
|
||||
// .attr("width", width * devicePixelRatio)
|
||||
// .attr("height", height * devicePixelRatio)
|
||||
// .style("width", width + "px")
|
||||
// .style("height", height + "px")
|
||||
// .style("margin-left", margin.left + 1 + "px") /* magic number: this seems to be visually correct when it is equal to the amount axis is translated by plus or minus... a little? */
|
||||
// .style("margin-top", margin.top + "px")
|
||||
//
|
||||
// var ctx = canvas.node().getContext("2d");
|
||||
// ctx.globalCompositeOperation = 'darken';
|
||||
// ctx.globalAlpha = 0.15;
|
||||
// ctx.lineWidth = 1.5;
|
||||
// ctx.scale(devicePixelRatio, devicePixelRatio);
|
||||
|
||||
return {
|
||||
svg,
|
||||
// ctx,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user