hi i am forming a complex tree structure using d3.js and html5 drag and Drop, however we were able to form the tree but when i click on the cloned D3 node(SVG) i want to trigger the ng-click associated with the angular element from which the d3 element is being formed.. this is what i was able to achieve as of now.. please see the code and picture for your refrence
function selectNode(d, i,type,$rootScope) {
var id = this.getAttribute("id");
document.getElementById(id)
$rootScope(id).isVisible=true;
switch (selectedNodes.length) {
case 0:
selectedNodes[0]= nodeMap[id];
break;
case 1:
if (!d3.event.ctrlKey){
obj = selectedNodes.pop();
obj.svg.setAttribute("style", "stroke-width:0");
selectedNodes[0]= nodeMap[id];
}else{
nodeMap[id].parent = selectedNodes[0];
selectedNodes[1]= nodeMap[id];
selectedNodes[0].children.push(selectedNodes[1]);
}
break;
case 2:
obj = selectedNodes.pop();
obj.svg.setAttribute("style", "stroke-width:0");
obj = selectedNodes.pop();
obj.svg.setAttribute("style", "stroke-width:0");
selectedNodes[0]= nodeMap[id];
break;
}
this.setAttribute("style", "stroke-width:3;stroke:rgb(0,255,0)");
}