/[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.1 by humppake, Thu Apr 24 07:48:04 2003 UTC revision 1.2 by humppake, Thu Apr 24 10:26:14 2003 UTC
# Line 150  def is_linked(diagram): Line 150  def is_linked(diagram):
150      log = log.replace("\n",'') # MetaPost (mpost) splits lines awkwardly in the log.      log = log.replace("\n",'') # MetaPost (mpost) splits lines awkwardly in the log.
151            
152      # Grep all linked areas from log file.      # Grep all linked areas from log file.
153      for link in re.findall('LINKRECT\((.*?)\)', log):      for link in re.findall('\"LINKRECT\((.*?)\)\"', log):
154          els = link.split(',')          els = link.split(',')
155          if els[0] != '"bbox"': return 1          if els[0] != '"bbox"': return 1
156    
# Line 166  def get_imagemap(diagram, context, scale Line 166  def get_imagemap(diagram, context, scale
166      bbox = None      bbox = None
167    
168      # Grep all linked areas from log file.      # Grep all linked areas from log file.
169      for link in re.findall('LINKRECT\((.*?)\)', log):      for link in re.findall('\"LINKRECT\((.*?)\)\"', log):
170          els = link.split(',')          els = link.split(',')
171          if els[0] == '"bbox"': bbox = els[2:len(els)]          if els[0] == '"bbox"': bbox = els[2:len(els)]
172          else: links.append(MPLink(els))          else: links.append(MPLink(els))
# Line 199  def get_targets(diagram): Line 199  def get_targets(diagram):
199      log = log.replace("\n",'') # MetaPost (mpost) splits lines awkwardly in the log.      log = log.replace("\n",'') # MetaPost (mpost) splits lines awkwardly in the log.
200    
201      # Grep all linked areas from log file.      # Grep all linked areas from log file.
202      for link in re.findall('LINKRECT\((.*?)\)', log):      for link in re.findall('\"LINKRECT\((.*?)\)\"', log):
203          els = link.split(',')          els = link.split(',')
204          if els[0] != '"bbox"': targets.append(MPLink(els).target)          if els[0] != '"bbox"': targets.append(MPLink(els).target)
205    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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