Commit e88fca3d authored by Masayuki Tanaka's avatar Masayuki Tanaka

Bind onenter/onleave to root svg

parent e78efe00
...@@ -863,7 +863,9 @@ ...@@ -863,7 +863,9 @@
// Define svgs // Define svgs
svg = d3.select(__bindto).append("svg") svg = d3.select(__bindto).append("svg")
.attr("width", width + margin.left + margin.right) .attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom); .attr("height", height + margin.top + margin.bottom)
.on('mouseenter', __onenter)
.on('mouseleave', __onleave);
// Define defs // Define defs
defs = svg.append("defs"); defs = svg.append("defs");
...@@ -986,9 +988,7 @@ ...@@ -986,9 +988,7 @@
// Define g for chart area // Define g for chart area
main.append('g') main.append('g')
.attr("clip-path", clipPath) .attr("clip-path", clipPath)
.attr('class', 'chart') .attr('class', 'chart');
.on('mouseenter', __onenter)
.on('mouseleave', __onleave);
// Cover whole with rects for events // Cover whole with rects for events
main.select('.chart').append("g") main.select('.chart').append("g")
......
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