[#3228] Core support for Gems, and namespace — "Luke A. Kanies" <luke@...>

Hi all,

21 messages 2004/07/27
[#3230] Re: Core support for Gems, and namespace — Austin Ziegler <halostatue@...> 2004/07/27

On Tue, 27 Jul 2004 11:39:08 +0900, Luke A. Kanies <luke@madstop.com> wrote:

[#3234] Re: Core support for Gems, and namespace — "Luke A. Kanies" <luke@...> 2004/07/27

On Tue, 27 Jul 2004, Austin Ziegler wrote:

[#3238] Re: Core support for Gems, and namespace — Austin Ziegler <halostatue@...> 2004/07/27

On Wed, 28 Jul 2004 00:14:29 +0900, Luke A. Kanies <luke@madstop.com> wrote:

[rdoc] client side imagemap patch (rdoc/diagram.rb)

From: Michael Neumann <mneumann@...>
Date: 2004-07-16 10:15:52 UTC
List: ruby-core #3193
Hi,

Konquerer does not like image maps with coordinates where x1 > x2 or
y1 > y2 for corners (x1,y1), (x2,y2).

I've appended a patch that fixes this.

Regards,

   Michael

Attachments (1)

diagram.diff (925 Bytes, text/x-diff)
--- rdoc/diagram.rb.old	Fri Jun  4 17:52:16 2004
+++ rdoc/diagram.rb	Fri Jun  4 17:54:09 2004
@@ -309,7 +309,7 @@
     # the page
 
     def wrap_in_image_map(src, dot, name)
-      res = %{<map name="map">\n}
+      res = %{<map id="map" name="map">\n}
       dot_map = `dot -Tismap #{src}`
       dot_map.each do |area|
         unless area =~ /^rectangle \((\d+),(\d+)\) \((\d+),(\d+)\) ([\/\w.]+)\s*(.*)/
@@ -317,10 +317,10 @@
           return nil
         end
         
-        blx = $1; bly = $2
-        trx = $3; try = $4
-        url = $5; area_name = $6
-        res <<  %{  <area shape="RECT" coords="#{blx},#{try},#{trx},#{bly}" }
+        xs, ys = [$1.to_i, $3.to_i], [$2.to_i, $4.to_i]
+        url, area_name = $5, $6
+
+        res <<  %{  <area shape="RECT" coords="#{xs.min},#{ys.min},#{xs.max},#{ys.max}" }
         res <<  %{     href="#{url}" alt="#{area_name}">\n}
       end
       res << "</map>\n"

In This Thread

Prev Next