git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into feature/JAL-3364splitFrameImage
[jalview.git]
/
src
/
jalview
/
gui
/
IdCanvas.java
diff --git
a/src/jalview/gui/IdCanvas.java
b/src/jalview/gui/IdCanvas.java
index
ab5585c
..
793c005
100755
(executable)
--- a/
src/jalview/gui/IdCanvas.java
+++ b/
src/jalview/gui/IdCanvas.java
@@
-380,33
+380,20
@@
public class IdCanvas extends JPanel implements ViewportListenerI
int alignmentWidth = alignViewport.getAlignment().getWidth();
final int alheight = alignViewport.getAlignment().getHeight();
int alignmentWidth = alignViewport.getAlignment().getWidth();
final int alheight = alignViewport.getAlignment().getHeight();
- int annotationHeight = 0;
+ /*
+ * assumption: SeqCanvas.calculateWrappedGeometry has been called
+ */
+ SeqCanvas seqCanvas = alignViewport.getAlignPanel()
+ .getSeqPanel().seqCanvas;
final int charHeight = alignViewport.getCharHeight();
final int charHeight = alignViewport.getCharHeight();
- int hgap = charHeight;
- if (alignViewport.getScaleAboveWrapped())
- {
- hgap += charHeight;
- }
AnnotationLabels labels = null;
if (alignViewport.isShowAnnotation())
{
AnnotationLabels labels = null;
if (alignViewport.isShowAnnotation())
{
- if (ap == null)
- {
- ap = new AnnotationPanel(alignViewport);
- }
- annotationHeight = ap.adjustPanelHeight()
- + SeqCanvas.SEQS_ANNOTATION_GAP;
labels = new AnnotationLabels(alignViewport);
}
labels = new AnnotationLabels(alignViewport);
}
- /*
- * height of alignment + gap + annotations (if shown)
- */
- int cHeight = alheight * charHeight + hgap
- + annotationHeight;
-
ViewportRanges ranges = alignViewport.getRanges();
int rowSize = ranges.getViewportWidth();
ViewportRanges ranges = alignViewport.getRanges();
int rowSize = ranges.getViewportWidth();
@@
-416,7
+403,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
* out of visible space, whichever comes first
*/
boolean hasHiddenRows = alignViewport.hasHiddenRows();
* out of visible space, whichever comes first
*/
boolean hasHiddenRows = alignViewport.hasHiddenRows();
- int ypos = hgap;
+ int ypos = seqCanvas.wrappedSpaceAboveAlignment;
int rowStartRes = ranges.getStartRes();
while ((ypos <= pageHeight) && (rowStartRes < alignmentWidth))
{
int rowStartRes = ranges.getStartRes();
while ((ypos <= pageHeight) && (rowStartRes < alignmentWidth))
{
@@
-441,7
+428,7
@@
public class IdCanvas extends JPanel implements ViewportListenerI
g.translate(0, -ypos - (alheight * charHeight));
}
g.translate(0, -ypos - (alheight * charHeight));
}
- ypos += cHeight;
+ ypos += seqCanvas.wrappedRepeatHeightPx;
rowStartRes += rowSize;
}
}
rowStartRes += rowSize;
}
}