Diff for /loncom/homework/functionplotresponse.pm between versions 1.50 and 1.54

version 1.50, 2011/01/14 01:56:32 version 1.54, 2011/01/28 16:25:03
Line 108  sub init_script { Line 108  sub init_script {
           $script.="if (param=='applet_$id') { loaded_$id=true; }\n";            $script.="if (param=='applet_$id') { loaded_$id=true; }\n";
       }        }
       $script.="if (".join(' && ',map { "loaded_$_" } (@Apache::functionplotresponse::callscripts)).        $script.="if (".join(' && ',map { "loaded_$_" } (@Apache::functionplotresponse::callscripts)).
                ") { setTimeout('ggbInitAll()',20) }";                 ") { setTimeout('ggbInitAll()',200) }";
       my $calls=join("\n",map { "ggbInit_$_();" } (@Apache::functionplotresponse::callscripts));         my $calls=join("\n",map { "ggbInit_$_();" } (@Apache::functionplotresponse::callscripts)); 
       return (<<ENDGGBINIT);        return (<<ENDGGBINIT);
 <script type="text/javascript">  <script type="text/javascript">
Line 184  sub set_slope_coordinate { Line 184  sub set_slope_coordinate {
    my $mult=($fixed?'a*':'');     my $mult=($fixed?'a*':'');
    return (<<ENDSETSVARIABLE);     return (<<ENDSETSVARIABLE);
 document.ggbApplet_$id.evalCommand("a=1");  document.ggbApplet_$id.evalCommand("a=1");
 document.ggbApplet_$id.evalCommand("$xvariable=Slider[0,$domain,$xinterval]");  document.ggbApplet_$id.evalCommand("$xvariable=Slider[$xinterval,$domain,$xinterval]");
 document.ggbApplet_$id.setVisible("$xvariable", false);  document.ggbApplet_$id.setVisible("$xvariable", false);
 document.ggbApplet_$id.evalCommand("$xvariable=$xrel");  document.ggbApplet_$id.evalCommand("$xvariable=$xrel");
 document.ggbApplet_$id.evalCommand("$yvariable=Slider[-$range,$range,$yinterval]");  document.ggbApplet_$id.evalCommand("$yvariable=Slider[-$range,$range,$yinterval]");
Line 536  sub start_functionplotrule { Line 536  sub start_functionplotrule {
                                      $token,'8').                                       $token,'8').
              &Apache::edit::end_row();               &Apache::edit::end_row();
   } elsif ($target eq 'modified') {    } elsif ($target eq 'modified') {
       if (($env{'form.'.&Apache::edit::html_element_name('xinitial')} ne '') && ($env{'form.'.&Apache::edit::html_element_name('xinitiallabel')} eq 'start')) {
          $env{'form.'.&Apache::edit::html_element_name('xinitiallabel')}='';
       }
       if (($env{'form.'.&Apache::edit::html_element_name('xfinal')} ne '') && ($env{'form.'.&Apache::edit::html_element_name('xfinallabel')} eq 'end')) {
          $env{'form.'.&Apache::edit::html_element_name('xfinallabel')}='';
       }
     my $constructtag=&Apache::edit::get_new_args($token,$parstack,      my $constructtag=&Apache::edit::get_new_args($token,$parstack,
                                                  $safeeval,'index','derivativeorder',                                                   $safeeval,'index','derivativeorder',
                                                            'xinitial','xinitiallabel','xfinal','xfinallabel',                                                             'xinitial','xinitiallabel','xfinal','xfinallabel',

Removed from v.1.50  
changed lines
  Added in v.1.54


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>