Commit 51f2776a authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix xgrid focus length when reized - #124

parent f7f94b33
...@@ -402,6 +402,13 @@ ...@@ -402,6 +402,13 @@
margin3.left = width / 2 + radiusExpanded; margin3.left = width / 2 + radiusExpanded;
} }
} }
function updateXgridFocus() {
main.select('line.' + CLASS.xgridFocus)
.attr("x1", __axis_rotated ? 0 : -10)
.attr("x2", __axis_rotated ? width : -10)
.attr("y1", __axis_rotated ? -10 : margin.top)
.attr("y2", __axis_rotated ? -10 : height);
}
function updateRadius() { function updateRadius() {
radiusExpanded = height / 2; radiusExpanded = height / 2;
radius = radiusExpanded * 0.95; radius = radiusExpanded * 0.95;
...@@ -2431,11 +2438,7 @@ ...@@ -2431,11 +2438,7 @@
grid.append('g') grid.append('g')
.attr("class", CLASS.xgridFocus) .attr("class", CLASS.xgridFocus)
.append('line') .append('line')
.attr('class', CLASS.xgridFocus) .attr('class', CLASS.xgridFocus);
.attr("x1", __axis_rotated ? 0 : -10)
.attr("x2", __axis_rotated ? width : -10)
.attr("y1", __axis_rotated ? -10 : margin.top)
.attr("y2", __axis_rotated ? -10 : height);
} }
// Y-Grid // Y-Grid
...@@ -2947,6 +2950,9 @@ ...@@ -2947,6 +2950,9 @@
// tooltip // tooltip
tooltip.style("display", "none"); tooltip.style("display", "none");
// xgrid focus
updateXgridFocus();
// grid // grid
main.select('line.' + CLASS.xgridFocus).style("visibility", "hidden"); main.select('line.' + CLASS.xgridFocus).style("visibility", "hidden");
if (__grid_x_show) { if (__grid_x_show) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment