mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-05 02:08:13 +08:00
return brush independently from container
This commit is contained in:
@@ -23,21 +23,23 @@ export const setupSVGandBrushElements = (
|
|||||||
.attr("height", side)
|
.attr("height", side)
|
||||||
.attr("class", `${styles.graphSVG}`);
|
.attr("class", `${styles.graphSVG}`);
|
||||||
|
|
||||||
svg.append("g").call(
|
const brush = d3
|
||||||
d3
|
.brush()
|
||||||
.brush()
|
.extent([
|
||||||
.extent([
|
[0, 0],
|
||||||
[0, 0],
|
[responsive.height - graphPaddingTop, responsive.height - graphPaddingTop]
|
||||||
[
|
])
|
||||||
responsive.height - graphPaddingTop,
|
.on("brush", handleBrushSelectAction)
|
||||||
responsive.height - graphPaddingTop
|
.on("end", handleBrushDeselectAction);
|
||||||
]
|
|
||||||
])
|
const brushContainer = svg
|
||||||
.on("brush", handleBrushSelectAction)
|
.append("g")
|
||||||
.on("end", handleBrushDeselectAction)
|
.attr("class", "graph_brush")
|
||||||
);
|
.call(brush);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
svg
|
svg,
|
||||||
|
brushContainer,
|
||||||
|
brush
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user