X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FOverviewDimensions.java;h=8dc7dd86aa0c8b15d1a920c1b17721a75ea73b4e;hb=4435c731351c802772dd1355fdb5747cfacd7838;hp=3ac236d17a75b6957d81026463081b5c8cbc84c1;hpb=a435a8668f8df568d3bdcf4e286210b69c18920c;p=jalview.git diff --git a/src/jalview/viewmodel/OverviewDimensions.java b/src/jalview/viewmodel/OverviewDimensions.java index 3ac236d..8dc7dd8 100644 --- a/src/jalview/viewmodel/OverviewDimensions.java +++ b/src/jalview/viewmodel/OverviewDimensions.java @@ -304,10 +304,10 @@ public abstract class OverviewDimensions boxY = Math.round(vpbox.y / heightRatio); // boxWidth is the width in residues translated to pixels - boxWidth = Math.round(vpbox.width / widthRatio); + boxWidth = Math.max(1, Math.round(vpbox.width / widthRatio)); // boxHeight is the height in sequences translated to pixels - boxHeight = Math.round(vpbox.height / heightRatio); + boxHeight = Math.max(1, Math.round(vpbox.height / heightRatio)); } /**