mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-09 06:58:12 +08:00
move clear context out of conditional in cont
This commit is contained in:
@@ -100,27 +100,24 @@ class Continuous extends React.Component {
|
|||||||
processedDimensions,
|
processedDimensions,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.props.dispatch({
|
||||||
|
type: "parallel coordinates axes have been drawn"
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
maybeDrawLines(nextProps) {
|
maybeDrawLines(nextProps) {
|
||||||
if (
|
if (
|
||||||
nextProps.ranges &&
|
nextProps.ranges &&
|
||||||
nextProps.continuousSelection &&
|
nextProps.continuousSelection &&
|
||||||
this.state.axes /* this may cause things to never render :/ forceUpdate? */
|
nextProps.axesHaveBeenDrawn /* this may cause things to never render :/ forceUpdate? */
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (this.state._drawLinesCanvas) {
|
if (this.state._drawLinesCanvas) {
|
||||||
this.state._drawLinesCanvas.invalidate();
|
this.state._drawLinesCanvas.invalidate();
|
||||||
this.state.ctx.clearRect(0,0,width,height);
|
|
||||||
this.state.ctx.globalAlpha = d3.min([
|
|
||||||
0.85 / Math.pow(this.props.initializeMetadata.length, 0.3),
|
|
||||||
1
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log( _.filter(this.state.processedMetadata, (d) => {
|
this.state.ctx.clearRect(0,0,width,height);
|
||||||
return nextProps.continuousSelection.indexOf(d.CellName) > -1
|
|
||||||
}))
|
|
||||||
|
|
||||||
const _drawLinesCanvas = drawLinesCanvas(
|
const _drawLinesCanvas = drawLinesCanvas(
|
||||||
_.filter(this.state.processedMetadata, (d) => {
|
_.filter(this.state.processedMetadata, (d) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user