X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FOverviewDimensions.java;h=8dc7dd86aa0c8b15d1a920c1b17721a75ea73b4e;hb=45b405507491a3d15d2b6b2c4f115a840945b28f;hp=3ac236d17a75b6957d81026463081b5c8cbc84c1;hpb=04e88679fd837e9fe36d186e5eacdd5f13a89927;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)); } /**