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

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 23 Apr 2002 15:21:36 -0000


matthew		Tue Apr 23 11:21:36 2002 EDT

  Modified files:              
    /loncom/xml	lonplot.pm 
  Log:
  Changed some defaults and such.  Nothing big.
  
  
Index: loncom/xml/lonplot.pm
diff -u loncom/xml/lonplot.pm:1.64 loncom/xml/lonplot.pm:1.65
--- loncom/xml/lonplot.pm:1.64	Tue Apr  9 14:01:09 2002
+++ loncom/xml/lonplot.pm	Tue Apr 23 11:21:36 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Dynamic plot
 #
-# $Id: lonplot.pm,v 1.64 2002/04/09 18:01:09 matthew Exp $
+# $Id: lonplot.pm,v 1.65 2002/04/23 15:21:36 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -156,14 +156,14 @@
 	 size        => '40'
 	 },
      height       => {
-	 default     => 200,
+	 default     => 300,
 	 test        => $int_test,
 	 description => 'height of image (pixels)',
       	 edit_type   => 'entry',
 	 size        => '10'
 	 },
      width        => {
-	 default     => 200,
+	 default     => 400,
 	 test        => $int_test,
 	 description => 'width of image (pixels)',
 	 edit_type   => 'entry',
@@ -190,7 +190,7 @@
 	 edit_type   => 'onoff'
 	 },
      grid         => {
-	 default     => 'off',
+	 default     => 'on',
 	 test        => $onoff_test, 
 	 description => 'Display grid',
 	 edit_type   => 'onoff'
@@ -209,7 +209,7 @@
 	 choices     => ['small','medium','large']
 	 },
      align        => {
-	 default     => 'left',
+	 default     => 'center',
 	 test        => sub {$_[0]=~/^(left|right|center)$/},
 	 description => 'alignment for image in html',
 	 edit_type   => 'choice',
@@ -306,6 +306,7 @@
 	 },
      );
 
+my @axis_edit_order = ('color','xmin','xmax','ymin','ymax');
 my %axis_defaults = 
     (
      color   => {
@@ -906,7 +907,8 @@
 			$tagstack->[-1]);
     } elsif ($target eq 'edit') {
 	$result .= &Apache::edit::tag_start($target,$token,'Plot Axes');
-	$result .= &edit_attributes($target,$token,\%axis_defaults);
+	$result .= &edit_attributes($target,$token,\%axis_defaults,
+				    \@axis_edit_order);
     } elsif ($target eq 'modified') {
 	my $constructtag=&Apache::edit::get_new_args
 	    ($token,$parstack,$safeeval,keys(%axis_defaults));