diff options
| author | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-16 20:28:43 +0000 |
|---|---|---|
| committer | dave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-16 20:28:43 +0000 |
| commit | a543a1ead6c29fea7ee3acc381bdbc1a92619ca6 (patch) | |
| tree | 4294d57be22dd6e6a6b5eb195d9f9ef4050be1c9 /lib | |
| parent | 2c5115d0c61b38379f4bc22c5e8637ec53c3aa5f (diff) | |
| download | ruby-a543a1ead6c29fea7ee3acc381bdbc1a92619ca6.tar.gz ruby-a543a1ead6c29fea7ee3acc381bdbc1a92619ca6.tar.xz ruby-a543a1ead6c29fea7ee3acc381bdbc1a92619ca6.zip | |
Incorporate Micheal Neumanns client-side imagemap patch
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/rdoc/diagram.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rdoc/diagram.rb b/lib/rdoc/diagram.rb index 94ab17bb3..62e2f2e16 100644 --- a/lib/rdoc/diagram.rb +++ b/lib/rdoc/diagram.rb @@ -309,7 +309,7 @@ module RDoc # 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 @@ module RDoc 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" |
