Commit d57422c0 authored by Tatiana Rocher's avatar Tatiana Rocher
Browse files

nodes are not selected when we click on axisY in barPlot

parent 2c070552
...@@ -1476,19 +1476,21 @@ ScatterPlot.prototype = { ...@@ -1476,19 +1476,21 @@ ScatterPlot.prototype = {
leg.exit() leg.exit()
.remove(); .remove();
leg.on("click", function(d){ leg.on("click", function(d){
if (!d3.event.ctrlKey) if (self.mode !="bar"){
self.m.unselectAll() if (!d3.event.ctrlKey)
var listToSelect = []; self.m.unselectAll()
var halfRangeLine = 0.5; var listToSelect = [];
if (self.axisY.labels.length>1) var halfRangeLine = 0.5;
halfRangeLine = Math.abs((self.axisY.labels[0].pos - self.axisY.labels[1].pos)/2); if (self.axisY.labels.length>1)
halfRangeLine = Math.abs((self.axisY.labels[0].pos - self.axisY.labels[1].pos)/2);
for (n in self.nodes){ for (n in self.nodes){
if (Math.abs(self.axisY.pos(n) - d.pos) < halfRangeLine) if (Math.abs(self.axisY.pos(n) - d.pos) < halfRangeLine)
listToSelect.push(n); listToSelect.push(n);
}
self.m.multiSelect(listToSelect);
} }
self.m.multiSelect(listToSelect); })
})
.attr("x", function(d) { .attr("x", function(d) {
if (d.type == "subline") return self.sub_text_position_y; if (d.type == "subline") return self.sub_text_position_y;
......
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