function sociogramClass(a){this.container=a;this.log("sociogram created")} sociogramClass.prototype={container:this.container,sigma:null,request:{path:"chart/network_data"},response:null,nodes:[],edges:[],rad:500,nodeDistance:100,overloadGraph:function(){},load:function(){},nodeAt:function(a,b){},arrange:function(a,b,d){},extractNodesFromResponse:function(){},extractEdgesFromResponse:function(){},renderNodes:function(){},renderEdges:function(){},overload:{nodeNeighbors:function(a){},nodeDirectNeighbors:function(a){}},bindings:{clickNode:function(a,b){},clickStage:function(a, b){}},log:function(a){console.log("--[SOCIOGRAM]--");console.warn(a);console.log("--[/SOCIOGRAM]--")}};sociogramClass.prototype.overloadGraph=function(){sigma.classes.graph.addMethod("nodeNeighbors",this.overload.nodeNeighbors);sigma.classes.graph.addMethod("nodeDirectNeighbors",this.overload.nodeDirectNeighbors);this.log("graph overloaded")}; sociogramClass.prototype.load=function(){this.sigma=new sigma({renderer:{container:this.container,type:"canvas"}});var a=this;api.send(this.request,function(b){a.log(b);0==b.ModuleError&&(a.response=b,a.sigma.settings({defaultNodeColor:"#348ed8",defaultLabelSize:14,defaultLabelBGColor:"#ddd",defaultHoverLabelBGColor:"#002147",defaultLabelHoverColor:"#fff",labelThreshold:10,defaultEdgeType:"line"}),a.extractNodesFromResponse(),a.extractEdgesFromResponse(),a.addNodes(),a.addEdges(),a.sigma.bind("clickNode", function(b){a.bindings.clickNode(a,b)}),a.sigma.bind("clickStage",function(b){a.bindings.clickStage(a,b)}),a.sigma.graph.nodes().forEach(function(b){a.arrange(b.id,null,!0)}),a.sigma.camera.ratio=1.2,a.sigma.refresh())})};sociogramClass.prototype.nodeAt=function(a,b){var d=this.sigma.graph.nodes(),c=null,e;for(e in d){var f=Math.sqrt(Math.pow(a-d[e].x,2)+Math.pow(b-d[e].y,2));if(null==c||fMath.PI/10){e=!0;break}}while(e);a.x=b.x+this.nodeDistance*Math.cos(d);a.y=b.y+this.nodeDistance*Math.sin(d);this.arrange(a.id)}this.sigma.refresh()}};sociogramClass.prototype.overload.nodeNeighbors=function(a){a=this.allNeighborsIndex[a];var b=[],d;for(d in a)b.push(d);for(;0