- (lastHidden + 1) * scaleh * av.getCharHeight(), 1.5);
- assertEquals(od.getBoxWidth(), boxWidth, 1.5);
- assertEquals(od.getBoxHeight(), boxHeight, 1.5);
-
- // move viewport to end of alignment, need to account for hidden rows
- // because of how alignment panel/overview panel are implemented
-
- // AlignViewport adjusts endSeq using Alignment height which excludes hidden
- // rows if we happen to be at the bottom of the alignment
- // od.setBoxPosition adjusts endSeq to include hidden rows
- // od.checkValid adjusts scroll position to exclude hidden rows
- // TODO this test fails because of the above!
-
- /* moveViewport(0, 525 - viewHeight - lastHidden - 1);
- assertEquals(od.getBoxX(), 0);
- assertEquals(od.getBoxY(),
- (525 - viewHeight) * scaleh
- * av.getCharHeight(), 1.5);
- assertEquals(od.getBoxWidth(), boxWidth, 1.5);
- assertEquals(od.getBoxHeight(), boxHeight, 1.5);*/
+ Math.round((float) (lastHidden + 1) * od.getSequencesHeight()
+ / alheight));
+ assertEquals(od.getBoxWidth(), boxWidth);
+ assertEquals(od.getBoxHeight(), boxHeight);
+
+ // move viewport to end of alignment
+ moveViewport(0, 525 - viewHeight - lastHidden - 1);
+ assertEquals(od.getBoxX(), 0);
+ assertEquals(
+ od.getBoxY(),
+ Math.round((float) (525 - viewHeight) * od.getSequencesHeight()
+ / alheight));
+ assertEquals(od.getBoxWidth(), boxWidth);
+ assertEquals(od.getBoxHeight(), boxHeight);