Commit 5a0eb77f authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix resize bug

parent bf2d86d2
...@@ -1246,10 +1246,6 @@ ...@@ -1246,10 +1246,6 @@
var withY, withSubchart, withTransition, withUpdateXDomain; var withY, withSubchart, withTransition, withUpdateXDomain;
var duration; var duration;
// Hide tooltip and grid
main.select('line.xgrid-focus').style("visibility", "hidden");
tooltip.style("visibility", "hidden");
options = isDefined(options) ? options : {}; options = isDefined(options) ? options : {};
withY = isDefined(options.withY) ? options.withY : true; withY = isDefined(options.withY) ? options.withY : true;
withSubchart = isDefined(options.withSubchart) ? options.withSubchart : true; withSubchart = isDefined(options.withSubchart) ? options.withSubchart : true;
...@@ -1274,7 +1270,13 @@ ...@@ -1274,7 +1270,13 @@
subY.domain(y.domain()); subY.domain(y.domain());
subY2.domain(y2.domain()); subY2.domain(y2.domain());
// tooltip
tooltip.style("visibility", "hidden");
// grid // grid
main.select('line.xgrid-focus')
.style("visibility", "hidden")
.attr('y2', height);
if (__grid_x_show) { if (__grid_x_show) {
if (__grid_x_type === 'year') { if (__grid_x_type === 'year') {
xgridData = []; xgridData = [];
...@@ -1477,7 +1479,7 @@ ...@@ -1477,7 +1479,7 @@
d3.select('svg').attr('width', currentWidth).attr('height', currentHeight); d3.select('svg').attr('width', currentWidth).attr('height', currentHeight);
d3.select('#'+clipId).select('rect').attr('width', width).attr('height', height); d3.select('#'+clipId).select('rect').attr('width', width).attr('height', height);
d3.select('#xaxis-clip').select('rect').attr('width', width + 2); d3.select('#xaxis-clip').select('rect').attr('width', width + 2);
d3.select('.zoom-rect').attr('width', width); d3.select('.zoom-rect').attr('width', width).attr('height', height);
// Update main positions // Update main positions
main.select('.x.axis').attr("transform", translate.x); main.select('.x.axis').attr("transform", translate.x);
main.select('.y2.axis').attr("transform", translate.y2); main.select('.y2.axis').attr("transform", translate.y2);
......
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