JAL-3383 javadoc
[jalview.git] / src / jalview / viewmodel / OverviewDimensions.java
index 3ac236d..39d0098 100644 (file)
@@ -151,16 +151,31 @@ public abstract class OverviewDimensions
     return boxHeight;
   }
 
+  /**
+   * Returns the width of the Overview in pixels
+   * 
+   * @return
+   */
   public int getWidth()
   {
     return width;
   }
 
+  /**
+   * Returns the height of the Overview in pixels
+   * 
+   * @return
+   */
   public int getHeight()
   {
     return sequencesHeight + graphHeight;
   }
 
+  /**
+   * Returns the height of the sequence alignment in the Overview in pixels
+   * 
+   * @return
+   */
   public int getSequencesHeight()
   {
     return sequencesHeight;
@@ -304,10 +319,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));
   }
 
   /**