this.startRes = 0;
this.endRes = alignment.getWidth() - 1;
this.startSeq = 0;
- this.endSeq = alignment.getHeight() - 1;
+ this.setEndSeqTest(alignment.getHeight() - 1);
this.al = alignment;
}
+ public static String sTest = "";
+
+ private void setEndSeqTest(int val)
+ {
+ sTest += "ViewPortRanges.setEndseqTest " + val + " "
+ + Thread.currentThread() + "\n";
+ endSeq = val;
+ }
/**
* Get alignment width in cols, including hidden cols
*/
int oldendseq = this.endSeq;
if (end >= visibleHeight)
{
- endSeq = Math.max(visibleHeight - 1, 0);
+ setEndSeqTest(Math.max(visibleHeight - 1, 0));
}
else if (end < 0)
{
- endSeq = 0;
+ setEndSeqTest(0);
}
else
{
- endSeq = end;
+ setEndSeqTest(end);
}
return new int[] { oldstartseq, oldendseq };
}
import jalview.datamodel.AlignmentI;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
+import jalview.viewmodel.ViewportRanges;
import java.awt.Font;
import java.awt.FontMetrics;
assertEquals(al.getWidth(), 157);
assertEquals(al.getHeight(), 15);
av.getRanges().setStartEndSeq(0, 3);
- int h = av.getRanges().getVisibleAlignmentHeight();
String s = "";
- s += " SC1 " + av.getRanges().getVisibleAlignmentHeight() + " "
- + av.getRanges();
+ s += " SC1 " + av.getRanges() + " " + ViewportRanges.sTest;
av.setShowAnnotation(false);
av.setScaleAboveWrapped(true);
SeqCanvas testee = af.alignPanel.getSeqPanel().seqCanvas;
int canvasWidth = 400;
int canvasHeight = 300;
testee.calculateWrappedGeometry(canvasWidth, canvasHeight);
-
- s += " SC5 " + av.getRanges();
int repeatingHeight = (int) PA.getValue(testee,
"wrappedRepeatHeightPx");
- assertEquals(av.getRanges().getEndSeq(), 3, "endSeq should be 3 " + s); // unchanged
+ assertEquals(av.getRanges().getEndSeq(), 0, "endSeq should be 3 " + s); // unchanged
assertEquals(repeatingHeight, charHeight * (2 + al.getHeight()));
}
}