[Bps-public-commit] r11289 - WebChart/lib/WebChart

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Mar 31 03:47:13 EDT 2008


Author: sunnavy
Date: Mon Mar 31 03:47:13 2008
New Revision: 11289

Modified:
   WebChart/lib/WebChart/Renderer.pm

Log:
more default config in Renderer.pm

Modified: WebChart/lib/WebChart/Renderer.pm
==============================================================================
--- WebChart/lib/WebChart/Renderer.pm	(original)
+++ WebChart/lib/WebChart/Renderer.pm	Mon Mar 31 03:47:13 2008
@@ -35,12 +35,19 @@
     my $self = shift;
     my $args = shift;
     $args->{web_img_dir} ||= '/charts';
-    unless ( $args->{img_dir} ) {
-        require File::Spec;
-        $args->{img_dir} = File::Spec->tmpdir;
+    $args->{web_xml_dir} = '/xml';
+    $args->{web_js_dir} ||= '/js';
+    $args->{web_css_dir} ||= '/css';
+    $args->{web_flash_dir} ||= '/flash';
+
+    for (qw/img_dir xml_dir/) {
+        unless ( $args->{$_} ) {
+            require File::Spec;
+            $args->{$_} = File::Spec->tmpdir;
+        }
     }
 
-    $args->{width} = 400 unless $args->{width};
+    $args->{width}  = 400 unless $args->{width};
     $args->{height} = 300 unless $args->{height};
 
     delete $args->{css_class}



More information about the Bps-public-commit mailing list