X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAlignViewport.java;h=065c503def15b9d94222ef5a0da341f1e1a2d86e;hb=97b26ba418dec7a6e926378205d25470bf098633;hp=f927e638c2d175394f06716bdfd85be15627e36a;hpb=d559b47886de6427219011e6e355320a0babd757;p=jalview.git diff --git a/src/jalview/appletgui/AlignViewport.java b/src/jalview/appletgui/AlignViewport.java index f927e63..065c503 100644 --- a/src/jalview/appletgui/AlignViewport.java +++ b/src/jalview/appletgui/AlignViewport.java @@ -39,6 +39,7 @@ import jalview.structure.SelectionSource; import jalview.structure.StructureSelectionManager; import jalview.structure.VamsasSource; import jalview.viewmodel.AlignmentViewport; +import jalview.viewmodel.ViewportRanges; import java.awt.Font; @@ -74,12 +75,10 @@ public class AlignViewport extends AlignmentViewport implements calculator = new jalview.workers.AlignCalcManager(); this.applet = applet; alignment = al; + ranges = new ViewportRanges(this.alignment); // we always pad gaps this.setPadGaps(true); - this.setStartRes(0); - this.setEndRes(al.getWidth() - 1); - this.setStartSeq(0); - this.setEndSeq(al.getHeight() - 1); + if (applet != null) { // get the width and height scaling factors if they were specified @@ -298,7 +297,7 @@ public class AlignViewport extends AlignmentViewport implements public void resetSeqLimits(int height) { - setEndSeq(height / getCharHeight()); + ranges.setEndSeq(height / getCharHeight()); } public void setCurrentTree(NJTree tree)