public void dragAlongEdge(){ 	 
    	
    	 //Get the two points of the line segment currently dragged along
    	 Coordinate pt1 = this.draggingEdge.hintCoords.get(this.currentView);
    	 Coordinate pt2 = this.draggingEdge.hintCoords.get(this.nextView);
         float [] minDist = minDistancePoint(parent.mouseX,parent.mouseY,pt1.x,pt1.y,pt2.x,pt2.y);
         Coordinate newPoint; //The new point to draw on the line
         float t = minDist[2]; //To test whether or not the dragged point will pass pt1 or pt2
       
         if (t<0){ //Passed current   
             moveBackward();               
             newPoint = new Coordinate(pt1.x,pt1.y);
         }else if (t>1){ //Passed next         	 
             moveForward();                     
             newPoint= new Coordinate(pt2.x,pt2.y);
         }else{ //Some in between the views (pt1 and pt2)                         
             newPoint= new Coordinate (minDist[0],minDist[1]);             
             this.interpAmount = t;              
         } 
         
         this.drawingView = this.currentView;
         //Check if mouse is beyond the last view point
         if (minDist[2]>1 && this.nextView==(this.numTimeSlices-1)){
        	 Coordinate lastPoint = this.draggingEdge.hintCoords.get(this.numTimeSlices);
        	 float [] minDist2 = minDistancePoint(parent.mouseX,parent.mouseY,pt2.x,pt2.y,lastPoint.x,lastPoint.y);
        	 if (minDist2[2]<1){ //Beyond the second last point (pt2)
        		 newPoint= new Coordinate (minDist2[0],minDist2[1]);
        	 }else{
        		 newPoint = new Coordinate(lastPoint.x,lastPoint.y);
        	 }
        	 this.drawingView = this.nextView;
         }      
         
         this.animateGraph(this.currentView, this.nextView, this.interpAmount);	            
         this.draggingEdge.animateAnchor(newPoint.x,newPoint.y,this.timelineLabels.get(this.drawingView));        	 
     }