mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-06 06:18:12 +08:00
no flashing
This commit is contained in:
@@ -114,6 +114,9 @@ const _drawGraphUsingRenderQueue = (
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* clear canvas */
|
||||||
|
context.clearRect(0, 0, globals.graphWidth, globals.graphHeight);
|
||||||
|
|
||||||
const _renderGraphWithFunctionReturnedByQueue = renderQueue(
|
const _renderGraphWithFunctionReturnedByQueue = renderQueue(
|
||||||
drawGraph(
|
drawGraph(
|
||||||
context,
|
context,
|
||||||
@@ -133,7 +136,7 @@ const _drawGraphUsingRenderQueue = (
|
|||||||
return _renderGraphWithFunctionReturnedByQueue;
|
return _renderGraphWithFunctionReturnedByQueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const drawGraphUsingRenderQueue = _.debounce(_drawGraphUsingRenderQueue, 50);
|
export const drawGraphUsingRenderQueue = _.debounce(_drawGraphUsingRenderQueue, 20);
|
||||||
|
|
||||||
const setupGraphBrush = (
|
const setupGraphBrush = (
|
||||||
svg,
|
svg,
|
||||||
|
|||||||
@@ -82,8 +82,6 @@ class Graph extends React.Component {
|
|||||||
// nextProps.expressions &&
|
// nextProps.expressions &&
|
||||||
// nextProps.expressionsCountsMap &&
|
// nextProps.expressionsCountsMap &&
|
||||||
) {
|
) {
|
||||||
/* clear canvas */
|
|
||||||
this.state.ctx.clearRect(0, 0, globals.graphWidth, globals.graphHeight);
|
|
||||||
|
|
||||||
drawGraphUsingRenderQueue(
|
drawGraphUsingRenderQueue(
|
||||||
this.state.ctx,
|
this.state.ctx,
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ export const drawScatterplotCanvasUsingRenderQueue = (
|
|||||||
scatterplotXXaccessor,
|
scatterplotXXaccessor,
|
||||||
scatterplotYYaccessor
|
scatterplotYYaccessor
|
||||||
) => {
|
) => {
|
||||||
|
/* clear canvas */
|
||||||
|
context.clearRect(0, 0, width, height);
|
||||||
|
|
||||||
const _currentCellSelectionMap = _.keyBy(currentCellSelection, "CellName"); /* move me to the reducer */
|
const _currentCellSelectionMap = _.keyBy(currentCellSelection, "CellName"); /* move me to the reducer */
|
||||||
|
|
||||||
|
|||||||
@@ -74,8 +74,6 @@ class Scatterplot extends React.Component {
|
|||||||
this.state.xScale &&
|
this.state.xScale &&
|
||||||
this.state.yScale
|
this.state.yScale
|
||||||
) {
|
) {
|
||||||
/* clear canvas */
|
|
||||||
this.state.ctx.clearRect(0, 0, width, height);
|
|
||||||
drawScatterplotCanvas(
|
drawScatterplotCanvas(
|
||||||
this.state.ctx,
|
this.state.ctx,
|
||||||
this.state.xScale,
|
this.state.xScale,
|
||||||
|
|||||||
Reference in New Issue
Block a user