JAL-2844 reallow clicks to the left of the root (groups whole tree as 1)
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Fri, 8 Dec 2017 13:47:57 +0000 (13:47 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Fri, 8 Dec 2017 13:48:04 +0000 (13:48 +0000)
src/jalview/ext/archaeopteryx/JalviewBinding.java

index 41d18f5..88b2d15 100644 (file)
@@ -296,14 +296,9 @@ public final class JalviewBinding
       furthestNodeX = furthestNode.getXcoord();
       rootX = tree.getRoot().getXcoord();
 
-      if (furthestNodeX != rootX && !(x < rootX || x > furthestNodeX)) // don't
-                                                                       // bother
-                                                                       // if 0
-                                                       // distance tree or
-                                                       // clicked x lies outside
-                                                       // of tree
+      // don't bother if 0 distance tree or clicked x lies outside of tree
+      if (furthestNodeX != rootX && !(x > furthestNodeX))
       {
-
         float threshold = (x - rootX) / (furthestNodeX - rootX);
         List<PhylogenyNode> foundNodes = getNodesAboveThreshold(threshold,
                 tree.getRoot());