JAL-2844 check added for clicks left of root node
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 29 Nov 2017 17:45:42 +0000 (17:45 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Wed, 29 Nov 2017 17:45:42 +0000 (17:45 +0000)
src/jalview/ext/archaeopteryx/JalviewBinding.java

index 1649b62..21e53a2 100644 (file)
@@ -265,7 +265,9 @@ public final class JalviewBinding
       furthestNodeX = furthestNode.getXcoord();
       rootX = tree.getRoot().getXcoord();
 
-      if (furthestNodeX != rootX && x < furthestNodeX) // don't bother if 0
+      if (furthestNodeX != rootX && !(x < rootX || x > furthestNodeX)) // don't
+                                                                       // bother
+                                                                       // if 0
                                                        // distance tree or
                                                        // clicked x lies outside
                                                        // of tree