Commit 4ab25d8c authored by PkSM3's avatar PkSM3

dbclick when cursor_size>0 = OK

parent 9584e681
......@@ -55,7 +55,6 @@ var seed=999999999;//defaultseed
var semanticConverged=false;
var showLabelsIfZoom=2.0;
var greyColor = "#9b9e9e";
......
......@@ -377,17 +377,43 @@ function theListeners(){
$('#sigma-example').dblclick(function(event) {
pr("in the double click event");
targeted = partialGraph._core.graph.nodes.filter(function(n) {
return !!n['hover'];
}).map(function(n) {
return n.id;
var targeted = [];
if(cursor_size>0) {
//Multiple selection
x1 = partialGraph._core.mousecaptor.mouseX;
y1 = partialGraph._core.mousecaptor.mouseY;
var counter=0;
var actualSel=[];
partialGraph.iterNodes(function(n){
if(!n.hidden){
distance = Math.sqrt(
Math.pow((x1-parseInt(n.displayX)),2) +
Math.pow((y1-parseInt(n.displayY)),2)
);
if(parseInt(distance)<=cursor_size) {
counter++;
actualSel.push(n.id);
}
}
});
targeted = actualSel;
} else {
targeted = partialGraph._core.graph.nodes.filter(function(n) {
return !!n['hover'];
}).map(function(n) {
return n.id;
});
}
if(!is_empty(targeted)) changeLevel();
else {
if(!is_empty(selections)){
cancelSelection(false);
// LevelButtonDisable(true);
}
}
});
......@@ -430,7 +456,6 @@ function theListeners(){
if(cursor_size>0) {
//Multiple selection
x1 = partialGraph._core.mousecaptor.mouseX;
y1 = partialGraph._core.mousecaptor.mouseY;
var counter=0;
......
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