Commit 8f251ff9 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix bar selection

parent 38fbd9e2
...@@ -1503,9 +1503,9 @@ ...@@ -1503,9 +1503,9 @@
} }
function isWithinBar(_this) { function isWithinBar(_this) {
var mouse = d3.mouse(_this), box = _this.getBBox(); var mouse = d3.mouse(_this), box = _this.getBBox();
var x = box.x, y = box.y, w = box.width; var x = box.x, y = box.y, w = box.width, h = box.height, offset = 10;
var sx = x - 10, ex = x + w + 10, ey = y - 10; var sx = x - offset, ex = x + w + offset, sy = y + h + offset, ey = y - offset;
return sx < mouse[0] && mouse[0] < ex && ey < mouse[1]; return sx < mouse[0] && mouse[0] < ex && ey < mouse[1] && mouse[1] < sy;
} }
function isWithinRegions(x, regions) { function isWithinRegions(x, regions) {
var i; var i;
......
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