X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FIdCanvas.java;h=f68d967aebebb4d7c5f90361ca1284b78a4221d7;hb=572614a0e8741a5683b0a2369642e1d3e414cdbd;hp=1bf5cc6ec8549cef15a01a6a9c7fe7a1c2652f22;hpb=b4c5fa923c49731469265b2be25d49c90d934b0a;p=jalview.git diff --git a/src/jalview/gui/IdCanvas.java b/src/jalview/gui/IdCanvas.java index 1bf5cc6..f68d967 100755 --- a/src/jalview/gui/IdCanvas.java +++ b/src/jalview/gui/IdCanvas.java @@ -56,70 +56,25 @@ public class IdCanvas extends JPanel //Which ids are we printing int starty = av.getStartSeq(); - int endy = av.getEndSeq(); + int endy = av.endSeq; if (av.getWrapAlignment()) { - starty = starty%av.getChunkHeight(); + // Draw the rest of the panels + int chunkHeight = (da.getHeight() + 2)*av.charHeight; + int row = av.getStartRes() / av.chunkWidth ; + for(int ypos=2*av.charHeight; + ypos <= getHeight() && row*av.chunkWidth da.getHeight()) { - endy = da.getHeight(); - } - - for (int i = starty; i < endy; i++) { - SequenceI s = da.getSequenceAt(i); - drawIdString(gg,s,i,starty,ypos); - } - if (rowstart == 0) { - ypos = ypos + av.getChunkHeight(); - } else if (rowstart == 1) { - ypos = ypos + av.getChunkHeight(); - } else { - ypos = ypos + av.getChunkHeight() - rowstart*charHeight; - } - - starty = 0; - - int chunkwidth = av.getChunkWidth(); - int startx = (int)(av.getEndSeq()/chunkwidth)*chunkwidth; - int endx = startx + chunkwidth; - - - while (ypos <= getHeight() && endx < da.getWidth()) { - - for (int i = starty; i < endy; i++) { - SequenceI s = da.getSequenceAt(i); - drawIdString(gg,s,i,starty,ypos); - } - - ypos += av.getChunkHeight(); - startx += chunkwidth; - endx = startx + chunkwidth; - - if (endx > da.getWidth()) { - endx = da.getWidth(); - } - - starty = 0; - - if (endy > da.getHeight()) { - endy = da.getHeight(); - } - - } } else {