Commit 3ed2da83 authored by Marc Duez's avatar Marc Duez
Browse files
parents 74468f1e f96e4396
...@@ -1391,14 +1391,17 @@ ScatterPlot.prototype = { ...@@ -1391,14 +1391,17 @@ ScatterPlot.prototype = {
leg.exit() leg.exit()
.remove(); .remove();
leg.on("click", function(d){ leg.on("click", function(d){
if (!d3.event.ctrlKey)
self.m.unselectAll()
var listToSelect = []; var listToSelect = [];
var halfRangeColumn = 0.5; var halfRangeColumn = 0.5;
if (self.axisX.labels.length>1) if (self.axisX.labels.length>1)
halfRangeColumn = Math.abs((self.axisX.labels[1].pos - self.axisX.labels[0].pos)/2); halfRangeColumn = Math.abs((self.axisX.labels[1].pos - self.axisX.labels[0].pos)/2);
for (n in self.nodes){ for (n=0; n<self.nodes.length; n++){
if (Math.abs(self.axisX.pos(n) - d.pos) < halfRangeColumn) if (self.m.clones[n].germline == (self.m.germlineV.system))
listToSelect.push(n); if (Math.abs(self.axisX.pos(self.nodes[n]) - d.pos) < halfRangeColumn)
} listToSelect.push(self.nodes[n]);
}
self.m.multiSelect(listToSelect); self.m.multiSelect(listToSelect);
}) })
.attr("x", function(d) { .attr("x", function(d) {
...@@ -1494,17 +1497,21 @@ ScatterPlot.prototype = { ...@@ -1494,17 +1497,21 @@ ScatterPlot.prototype = {
leg.exit() leg.exit()
.remove(); .remove();
leg.on("click", function(d){ leg.on("click", function(d){
var listToSelect = []; if (self.mode !="bar"){
var halfRangeLine = 0.5; if (!d3.event.ctrlKey)
if (self.axisY.labels.length>1) self.m.unselectAll()
halfRangeLine = Math.abs((self.axisY.labels[0].pos - self.axisY.labels[1].pos)/2); var listToSelect = [];
var halfRangeLine = 0.5;
for (n in self.nodes){ if (self.axisY.labels.length>1)
if (Math.abs(self.axisY.pos(n) - d.pos) < halfRangeLine) halfRangeLine = Math.abs((self.axisY.labels[0].pos - self.axisY.labels[1].pos)/2);
listToSelect.push(n); for (n=0; n<self.nodes.length; n++){
if (self.m.clones[n].germline == (self.m.germlineV.system))
if (Math.abs(self.axisY.pos(n) - d.pos) < halfRangeLine)
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;
...@@ -1676,7 +1683,8 @@ ScatterPlot.prototype = { ...@@ -1676,7 +1683,8 @@ ScatterPlot.prototype = {
}, },
/** /**
* check and put the correct currently selected axis for axisX/Y menu <br> * check and put the correct currently
axis for axisX/Y menu <br>
* */ * */
updateMenu: function() { updateMenu: function() {
var select_x = 0; var select_x = 0;
......
Supports Markdown
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