/[navidoc]/navidoc/navidoc/modules/imagemap.py
ViewVC logotype

Diff of /navidoc/navidoc/modules/imagemap.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by humppake, Fri Apr 25 17:41:30 2003 UTC revision 1.6 by humppake, Wed May 21 09:32:56 2003 UTC
# Line 120  def embed_implicit_diagram(filepath, dia Line 120  def embed_implicit_diagram(filepath, dia
120      htmlfile.close()      htmlfile.close()
121    
122      insert = html.find('<a id="'+diagram+'_implicit">')      insert = html.find('<a id="'+diagram+'_implicit">')
123      if insert == -1:  
124        """If explicit diagram found, will not insert implicit on."""
125        explicit = html.find('<a id="'+diagram+'">')
126        if explicit == -1: explicit = html.find('_uml="'+diagram)
127    
128        if insert == -1 and explicit == -1:
129          """          """
130          Implicit imagemaps are embedded after the first header or after          Implicit imagemaps are embedded after the first header or after
131          the <body> tag.          the <body> tag.
# Line 134  def embed_implicit_diagram(filepath, dia Line 139  def embed_implicit_diagram(filepath, dia
139          insert_left = insert          insert_left = insert
140      else: insert_left = html.find('/>', html.find('<img', insert))+2      else: insert_left = html.find('/>', html.find('<img', insert))+2
141            
142      if insert != -1:      if insert != -1 and explicit == -1:
143          context = filepath.replace("/","_")          context = filepath.replace("/","_")
144          if context.endswith(".gen.html"): context = context[0:len(context)-9]          if context.endswith(".gen.html"): context = context[0:len(context)-9]
145          if context.endswith(".html"): context = context[0:len(context)-5]          if context.endswith(".html"): context = context[0:len(context)-5]
146            context = context+'_implicit'
147    
148            create_uml(diagram, context, scale=0.5)
149          out = open(filepath, "w")                      out = open(filepath, "w")            
150          out.write(html[0:insert]);          out.write(html[0:insert]);
151          out.close()          out.close()
152          out = open(filepath, "w")                      out = open(filepath, "w")            
153          out.write(html[0:insert]);          out.write(html[0:insert]);
         create_uml(diagram, context, scale=0.5)  
154          dbg("Mapping diagram %s within %s" % (diagram, filepath))          dbg("Mapping diagram %s within %s" % (diagram, filepath))
155          imgmap = get_imagemap(diagram, context, scale=0.5, id_postfix="_implicit")          imgmap = get_imagemap(diagram, context, scale=0.5, id_postfix="_implicit")
156          dbg("Diagram %s imagemap: %s" % (diagram, "\n"+str(imgmap)))          dbg("Diagram %s imagemap: %s" % (diagram, "\n"+str(imgmap)))

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26