mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Incorporate Micheal Neumanns client-side imagemap patch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c376bc5e8
commit
9c54f61a50
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Jul 17 05:26:27 2004 Dave Thomas <dave@pragprog.com>
|
||||
|
||||
* lib/rdoc/diagram.rb: Incorporate Micheal Neumann's
|
||||
client-side imagemao patch
|
||||
|
||||
Fri Jul 16 11:17:38 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* error.c (exit_initialize): use EXIT_SUCCESS instead of 0.
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue