[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 28 Jul 2003 19:18:02 -0000


sakharuk		Mon Jul 28 15:18:02 2003 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  bug 1325 (request for default image scaling) is fixed. If the size of image exceeds the width of text it changes to 95% of text width.
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.155 loncom/xml/londefdef.pm:1.156
--- loncom/xml/londefdef.pm:1.155	Fri Jul 25 06:44:36 2003
+++ loncom/xml/londefdef.pm	Mon Jul 28 15:18:02 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.155 2003/07/25 10:44:36 www Exp $
+# $Id: londefdef.pm,v 1.156 2003/07/28 19:18:02 sakharuk Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -25,8 +25,7 @@
 # /home/httpd/html/adm/gpl.txt
 #
 # http://www.lon-capa.org/
-#
-# Copyright for TtHfunc and TtMfunc by Ian Hutchinson. 
+## Copyright for TtHfunc and TtMfunc by Ian Hutchinson. 
 # TtHfunc and TtMfunc (the "Code") may be compiled and linked into 
 # binary executable programs or libraries distributed by the 
 # Michigan State University (the "Licensee"), but any binaries so 
@@ -2011,6 +2010,7 @@
 	    } elsif ($width ne '') {
 		$width_param = $width*$scaling;      
 	    }
+	    if ($width_param > $ENV{'form.textwidth'}) {$width_param =0.95*$ENV{'form.textwidth'}}
 	    my $file;
 	    my $path;	
 	    if ($src =~ m!(.*)/([^/]*)$!) {