Diff for /loncom/homework/randomlabel.pm between versions 1.29 and 1.30

version 1.29, 2002/07/18 19:40:15 version 1.30, 2002/07/18 20:17:45
Line 145  sub end_randomlabel { Line 145  sub end_randomlabel {
     if( $count != 0) { $result.= "<param name=\"ICOUNT\" value=\"$count\">\n"; }      if( $count != 0) { $result.= "<param name=\"ICOUNT\" value=\"$count\">\n"; }
     $result .= "</applet>\n<BR />";      $result .= "</applet>\n<BR />";
   } elsif ($target eq 'tex') {    } elsif ($target eq 'tex') {
     $result='\end{picture}\\\\';      $result='\end{picture}\\\\ \vskip -3 cm';
   } elsif ($target eq 'edit') {    } elsif ($target eq 'edit') {
     $result.=&Apache::edit::end_table;      $result.=&Apache::edit::end_table;
   }    }
Line 268  sub end_labelgroup { Line 268  sub end_labelgroup {
       my $y = $Apache::randomlabel::ycoord[$i];        my $y = $Apache::randomlabel::ycoord[$i];
       my $value = $Apache::randomlabel::value[$i];        my $value = $Apache::randomlabel::value[$i];
 #      my $tcX=$x*($texwidth/$wwidth) - $texwidth;  #      my $tcX=$x*($texwidth/$wwidth) - $texwidth;
       my $tcX=($x)*($texwidth/$wwidth);        my $tcX=($x-2)*($texwidth/$wwidth);
 #      my $tcY=$TY1-$y*($TY1/$wheight)-2;  #      my $tcY=$TY1-$y*($TY1/$wheight)-2;
       my $ratio=($wwidth > 0 ? $wheight/$wwidth : 1 );        my $ratio=($wwidth > 0 ? $wheight/$wwidth : 1 );
       my $tcY=$TY1-$y*($TY1/$wheight)+$texwidth*$ratio;        my $tcY=$TY1-$y*($TY1/$wheight)+$texwidth*$ratio;

Removed from v.1.29  
changed lines
  Added in v.1.30


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