git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
306825a
)
JAL-2349 avoid div-by-zero when annotation height is zero (though poss better to...
author
Jim Procter
<j.procter@dundee.ac.uk>
Thu, 20 Oct 2022 15:45:16 +0000
(16:45 +0100)
committer
Jim Procter
<j.procter@dundee.ac.uk>
Thu, 20 Oct 2022 15:45:16 +0000
(16:45 +0100)
src/jalview/renderer/ContactGeometry.java
patch
|
blob
|
history
diff --git
a/src/jalview/renderer/ContactGeometry.java
b/src/jalview/renderer/ContactGeometry.java
index
0e5107a
..
52581fb
100644
(file)
--- a/
src/jalview/renderer/ContactGeometry.java
+++ b/
src/jalview/renderer/ContactGeometry.java
@@
-16,7
+16,8
@@
public class ContactGeometry
{
contact_height = contacts.getContactHeight();
// fractional number of contacts covering each pixel
- contacts_per_pixel = ((double) contact_height) / ((double) graphHeight);
+ contacts_per_pixel = (graphHeight < 1) ? contact_height
+ : ((double) contact_height) / ((double) graphHeight);
if (contacts_per_pixel >= 1)
{