--- loncom/homework/randomlabel.pm 2002/05/20 20:35:13 1.28
+++ loncom/homework/randomlabel.pm 2002/07/18 20:17:45 1.30
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# random labelling tool
#
-# $Id: randomlabel.pm,v 1.28 2002/05/20 20:35:13 albertel Exp $
+# $Id: randomlabel.pm,v 1.30 2002/07/18 20:17:45 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -111,7 +111,7 @@ sub start_randomlabel {
$bgimg=~s/http:\/[^\/]*/\/home\/httpd\/html/;
$bgimg=~s/\/$//;
$result.='\vspace*{2mm} \noindent \epsfxsize='.$texwidth.' mm \epsffile{'.
- $bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}(0,0)('.$texwidth.','.$texwidth*$h/$w.')'
+ $bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}('.$texwidth.','.$texwidth*$h/$w.')'
} elsif ($target eq 'edit') {
$result.=&Apache::edit::tag_start($target,$token);
$result.=&Apache::edit::text_arg('Image:','bgimg',$token,75).' ';
@@ -145,7 +145,7 @@ sub end_randomlabel {
if( $count != 0) { $result.= "\n"; }
$result .= "\n
";
} elsif ($target eq 'tex') {
- $result='\end{picture}\\\\';
+ $result='\end{picture}\\\\ \vskip -3 cm';
} elsif ($target eq 'edit') {
$result.=&Apache::edit::end_table;
}
@@ -268,7 +268,7 @@ sub end_labelgroup {
my $y = $Apache::randomlabel::ycoord[$i];
my $value = $Apache::randomlabel::value[$i];
# my $tcX=$x*($texwidth/$wwidth) - $texwidth;
- my $tcX=($x-10)*($texwidth/$wwidth);
+ my $tcX=($x-2)*($texwidth/$wwidth);
# my $tcY=$TY1-$y*($TY1/$wheight)-2;
my $ratio=($wwidth > 0 ? $wheight/$wwidth : 1 );
my $tcY=$TY1-$y*($TY1/$wheight)+$texwidth*$ratio;