Viewport fills entire screen (#430)

* full pane webgl and svg

* fixes for full pane selection and centering

* force graph remount, clear brush state
This commit is contained in:
Colin Megill
2018-11-13 11:45:38 -05:00
committed by GitHub
parent 9decf134e0
commit dbff824854
6 changed files with 45 additions and 31 deletions
@@ -12,22 +12,18 @@ export default (
handleBrushSelectAction,
handleBrushDeselectAction,
responsive,
graphPaddingTop
graphPaddingRight
) => {
const side = responsive.height - graphPaddingTop;
const svg = d3
.select("#graphAttachPoint")
.append("svg")
.attr("width", side)
.attr("height", side)
.attr("width", responsive.width - graphPaddingRight)
.attr("height", responsive.height)
.attr("class", `${styles.graphSVG}`);
const brush = d3
.brush()
.extent([
[0, 0],
[responsive.height - graphPaddingTop, responsive.height - graphPaddingTop]
])
.extent([[0, 0], [responsive.width - graphPaddingRight, responsive.height]])
.on("brush", handleBrushSelectAction)
.on("end", handleBrushDeselectAction);