--- loncom/homework/functionplotresponse.pm	2011/11/18 18:54:21	1.73
+++ loncom/homework/functionplotresponse.pm	2011/11/18 19:32:48	1.74
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # Functionplot responses
 #
-# $Id: functionplotresponse.pm,v 1.73 2011/11/18 18:54:21 www Exp $
+# $Id: functionplotresponse.pm,v 1.74 2011/11/18 19:32:48 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -412,12 +412,10 @@ sub plotvector_script {
    my $pointlabel=$label.'Point';
    my $pointx=2.*($xmax-$xmin)+$xmax;
    my $anglelabel=$label.'Angle';
-   return(<<ENDVECTOR);
-document.ggbApplet_$id.evalCommand("$startlabel=($xs,$ys)");
-document.ggbApplet_$id.setVisible("$startlabel",false);
-document.ggbApplet_$id.setLabelVisible("$startlabel",false);
-document.ggbApplet_$id.evalCommand("$endlabel=($xe,$ye)");
-document.ggbApplet_$id.setLabelVisible("$endlabel",false);
+   return 
+       &new_point_coordinate($id,$startlabel,$xs,$ys,0).
+       &new_point_coordinate($id,$endlabel,$xe,$ye,0).
+       (<<ENDVECTOR);
 document.ggbApplet_$id.evalCommand("$label=Vector[$startlabel,$endlabel]");
 document.ggbApplet_$id.setLabelVisible("$label",true);
 document.ggbApplet_$id.setLineThickness("$label",8);
@@ -425,9 +423,6 @@ document.ggbApplet_$id.evalCommand("$poi
 document.ggbApplet_$id.evalCommand("$anglelabel=Angle[$pointlabel,$startlabel,$endlabel]");
 document.ggbApplet_$id.setLabelVisible("$anglelabel",true);
 document.ggbApplet_$id.setLabelStyle("$anglelabel",VALUE=2);
-document.ggbApplet_$id.registerObjectUpdateListener('$startlabel','updatePointCoordinates_$id');
-document.ggbApplet_$id.registerObjectUpdateListener('$endlabel','updatePointCoordinates_$id');
-document.ggbApplet_$id.registerObjectUpdateListener('$anglelabel','updatePointCoordinates_$id');
 ENDVECTOR
 }