Commit 9692b714 authored by Fintan Mc Gee's avatar Fintan Mc Gee

got lasso working with zoom and pan

parent 9fa22cb2
......@@ -252,6 +252,11 @@ angular.module('blizaarModule.directives')
zoom = d3.zoom()
.scaleExtent([1, 10])
.on("zoom", zoomed);
zoom.filter(function(){
// var tempEvnt =d3.event;
// console.log(JSON.stringify(tempEvnt))
return d3.event.button === 1 || d3.event.type === 'wheel';;
});
colorService.updateCategoriesForNode(graphData.getColorCategories());
......@@ -477,14 +482,15 @@ angular.module('blizaarModule.directives')
})
.style("stroke-width", function (d) { return Math.sqrt(d.value); });
if(scope.getUseLasso()){
if(scope.getUseLasso()) {
// we drafe the lassoe selection rectanle ( invisible) on top of eges but underneath nodes
// to all nodes to be selected and to avoid edges blocking slection
var lasso = lassoService.lassoFunction(svg, scope, width, height, color);
//lasso.items(d3.selectAll(".node"));
} else {
svg.call(zoom);
}
// } else {
svg.call(zoom);
//}
node = svg.selectAll(".nodeList")
......
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