Browse Source

Fix xgrid focus length when reized - #124

pull/127/merge
Masayuki Tanaka 11 years ago
parent
commit
51f2776a56
  1. 16
      c3.js
  2. 4
      c3.min.js

16
c3.js

@ -402,6 +402,13 @@
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() {
radiusExpanded = height / 2;
radius = radiusExpanded * 0.95;
@ -2431,11 +2438,7 @@
grid.append('g')
.attr("class", CLASS.xgridFocus)
.append('line')
.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);
.attr('class', CLASS.xgridFocus);
}
// Y-Grid
@ -2947,6 +2950,9 @@
// tooltip
tooltip.style("display", "none");
// xgrid focus
updateXgridFocus();
// grid
main.select('line.' + CLASS.xgridFocus).style("visibility", "hidden");
if (__grid_x_show) {

4
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save