public void dragAroundNode(){   	
    	 if (this.selectedNode==-1) return;
    	
    	 Node n = this.nodes.get(this.selectedNode);	   	 
    	 //Find the angle of the mouse w.r.t the node's center point
	   	 float adj = parent.mouseX - n.x;
	   	 float opp = n.y - parent.mouseY;
	   	 float mouseAngle = (float) Math.atan2(adj,opp);
	 
	   	 if (mouseAngle < 0)	mouseAngle = (float) ((Math.PI - mouseAngle*(-1))+Math.PI);	 
	   	 
	   	float currentAngle = n.hintAngles.get(this.currentView).x; 
	   	float nextAngle = n.hintAngles.get(this.currentView).y;    	 
	   	float bounds = checkBounds(mouseAngle,currentAngle,nextAngle);
	   	
	   	//Prevent wrapping around the node hint path	   
	   	int fixAnchor = 0;
		   	
	   	if (this.nextView == (this.numTimeSlices-1) && mouseAngle < Math.PI && mouseAngle >= 0 
     			&& this.mouseAngle <= parent.TWO_PI && this.mouseAngle > Math.PI){ //Prevent wrapping around from last view to first vie
	   		fixAnchor = 1;
	   		mouseAngle = (float) (Math.PI*2 - 0.02);	   	   		
	   	}else if (this.currentView ==0 && mouseAngle > Math.PI && mouseAngle <= Math.PI*2 
     			&& this.mouseAngle >= 0 && this.mouseAngle < Math.PI){ //Prevent wrapping around from first to last view    		
    		 mouseAngle = (float) 0.02;
    		 fixAnchor = 1;
    	 }
	   	
	   	//Change views or update the view
	   	if (fixAnchor !=1){
		    if (bounds == 0){		    
		    	this.interpAmount = Math.abs(mouseAngle -currentAngle)/(nextAngle-currentAngle);		    	
		    }else if (bounds == 1) { //At current	
		    	moveBackward();			    				   
		    }else{ //At next	    	
		    	moveForward();		    	
		   } 
	    }
	   	
	 	float lastAngle = n.hintAngles.get(this.numTimeSlices-1).x;	   	
	    //System.out.println(this.currentView+" "+this.nextView+" "+this.drawingView+" "+this.interpAmount);	       
        animateGraph(this.currentView, this.nextView, this.interpAmount);
        if (this.nextView == (this.numTimeSlices-1) && 
 	   			(this.mouseAngle>=lastAngle && this.mouseAngle<=parent.TWO_PI)){ //Detect when last view is entered
 	   		this.drawingView = nextView;   		
 	   	}else{
        	this.drawingView = this.currentView;
        	
        }       
        n.animateAnchor(mouseAngle-parent.HALF_PI,fixAnchor,this.timelineLabels.get(this.drawingView));
	    this.mouseAngle = mouseAngle;
     }