JAL-3253-applet JAL-3383
[jalview.git] / src / jalview / viewmodel / OverviewDimensions.java
index 3ac236d..8dc7dd8 100644 (file)
@@ -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));
   }
 
   /**