scale above, left right added
[jalview.git] / src / jalview / gui / IdCanvas.java
index 959c83c..b693f98 100755 (executable)
@@ -113,14 +113,16 @@ public class IdCanvas extends JPanel
     Color currentColor     = Color.white;\r
     Color currentTextColor = Color.black;\r
 \r
+\r
     if (av.getWrapAlignment())\r
     {\r
+\r
+          int rowSize =  av.getEndRes() - av.getStartRes();\r
           // Draw the rest of the panels\r
-          int chunkHeight =  (av.alignment.getHeight() + 2)*av.charHeight;\r
-          int row = av.getStartRes() / av.chunkWidth ;\r
-          for(int ypos=2*av.charHeight;\r
-              ypos <= getHeight() && row*av.chunkWidth<av.alignment.getWidth();\r
-              ypos += chunkHeight, row++ )\r
+\r
+          for(int ypos=2*av.charHeight, row=av.getEndRes();\r
+              ypos <= getHeight() && row<av.alignment.getWidth();\r
+              ypos += av.chunkHeight, row+=rowSize )\r
           {\r
             for (int i = starty; i < av.alignment.getHeight(); i++)\r
             {\r