JAL-2609 slightly better updating of left/right scales...
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 28 Jul 2017 15:39:56 +0000 (17:39 +0200)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 28 Jul 2017 15:39:56 +0000 (17:39 +0200)
src/jalview/gui/SeqCanvas.java

index 373389d..8c8b1d8 100755 (executable)
@@ -1234,6 +1234,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
       visibleWidths++;
     }
     int viewportWidth = ranges.getViewportWidth();
+    int hgap = charHeight * (av.getScaleAboveWrapped() ? 2 : 1);
 
     if (positions > 0)
     {
@@ -1266,11 +1267,11 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
 
         if (av.getScaleLeftWrapped())
         {
-          // drawVerticalScale(gg, xpos, xpos + viewportWidth, y, true);
+          drawVerticalScale(gg, xpos, xpos + viewportWidth, y + hgap, true);
         }
         if (av.getScaleRightWrapped())
         {
-          // drawVerticalScale(gg, xpos, xpos + viewportWidth, y, false);
+          drawVerticalScale(gg, xpos, xpos + viewportWidth, y + hgap, false);
         }
 
         y -= repeatHeight;
@@ -1303,11 +1304,11 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
 
         if (av.getScaleLeftWrapped())
         {
-          drawVerticalScale(gg, xpos, xpos + viewportWidth, y, true);
+          drawVerticalScale(gg, xpos, xpos + viewportWidth, y + hgap, true);
         }
         if (av.getScaleRightWrapped())
         {
-          drawVerticalScale(gg, xpos, xpos + viewportWidth, y, false);
+          drawVerticalScale(gg, xpos, xpos + viewportWidth, y + hgap, false);
         }
 
         y += repeatHeight;