JAL-1241 - generate colour for all annotation values within range
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 21 Jun 2013 13:29:41 +0000 (14:29 +0100)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Fri, 21 Jun 2013 13:29:41 +0000 (14:29 +0100)
src/jalview/schemes/AnnotationColourGradient.java

index 218b5fa..729065c 100755 (executable)
@@ -228,14 +228,14 @@ public class AnnotationColourGradient extends ResidueColourScheme
           if (thresholdIsMinMax
                   && annotation.threshold != null
                   && aboveAnnotationThreshold == ABOVE_THRESHOLD
-                  && annotation.annotations[j].value > annotation.threshold.value)
+                  && annotation.annotations[j].value >= annotation.threshold.value)
           {
             range = (annotation.annotations[j].value - annotation.threshold.value)
                     / (annotation.graphMax - annotation.threshold.value);
           }
           else if (thresholdIsMinMax && annotation.threshold != null
                   && aboveAnnotationThreshold == BELOW_THRESHOLD
-                  && annotation.annotations[j].value > annotation.graphMin)
+                  && annotation.annotations[j].value >= annotation.graphMin)
           {
             range = (annotation.annotations[j].value - annotation.graphMin)
                     / (annotation.threshold.value - annotation.graphMin);
@@ -250,7 +250,7 @@ public class AnnotationColourGradient extends ResidueColourScheme
           {
             currentColour = colourScheme.findColour(c, j, seq);
           }
-          else if (range != 0)
+          else 
           {
             dr = rr * range + r1;
             dg = gg * range + g1;