diff blast_html.py @ 20:53cd304c5f26

Add index for multiple results; fix layout of query ruler for edge case The query ruler did not layout nicely if the last segment was too short to contain the text. For very short last segments the text is now displayed after the ruler.
author Jan Kanis <jan.code@jankanis.nl>
date Wed, 14 May 2014 16:20:29 +0200
parents 67ddcb807b7d
children
line wrap: on
line diff
--- a/blast_html.py	Tue May 13 18:06:36 2014 +0200
+++ b/blast_html.py	Wed May 14 16:20:29 2014 +0200
@@ -232,9 +232,11 @@
         percent_multiplier = 100 / query_length
         for i in range(1, query_length+1):
             if i % skip == 0:
-                yield dict(label = i, width = skip * percent_multiplier)
+                yield dict(label = i, width = skip * percent_multiplier, shorter = False)
         if query_length % skip != 0:
-            yield dict(label = query_length, width = (query_length % skip) * percent_multiplier)
+            yield dict(label = query_length,
+                       width = (query_length % skip) * percent_multiplier,
+                       shorter = True)
 
     @filter
     def hit_info(self, result):