[Jifty-commit] r3791 - in jifty/trunk: . lib/Jifty/Plugin/Chart/Renderer

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Aug 4 18:31:26 EDT 2007


Author: sterling
Date: Sat Aug  4 18:31:26 2007
New Revision: 3791

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/Chart/   (props changed)
   jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm

Log:
 r8373 at dynpc145:  andrew | 2007-08-04 17:30:10 -0500
  r8359 at dynpc145:  andrew | 2007-08-04 16:53:49 -0500
  Improved the way the DIV tag is generated for PlotKit.
 


Modified: jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm	(original)
+++ jifty/trunk/lib/Jifty/Plugin/Chart/Renderer/PlotKit.pm	Sat Aug  4 18:31:26 2007
@@ -74,8 +74,15 @@
     my $chart_id   = 'chart_' . Jifty->web->serial;
 
     # Output the <canvas> tag and include the chart's JS
+    my $div;
+    $div  = qq{<div id="$chart_id"};
+    $div .= qq{ class="@{[ join ' ', @{ $args{class} } ]}"};
+    $div .= qq{ height="$args{height}"} if $args{height};
+    $div .= qq{ width="$args{width}"}   if $args{width};
+    $div .= qq{></div>};
+
     Jifty->web->out(<<"    END_OF_HTML");
-<div id="$chart_id" height="$args{height}" width="$args{width}"></div>
+$div
 
 <script type="text/javascript">
 var plot = function() {


More information about the Jifty-commit mailing list