Author: mes
Date: 2009-12-11 15:13:22 -0800 (Fri, 11 Dec 2009)
New Revision: 18749

Modified:
   coreplugins/trunk/ManualLayout/src/ManualLayout/common/GraphConverter2.java
Log:
improved check to include test of NaN

Modified: 
coreplugins/trunk/ManualLayout/src/ManualLayout/common/GraphConverter2.java
===================================================================
--- coreplugins/trunk/ManualLayout/src/ManualLayout/common/GraphConverter2.java 
2009-12-11 20:41:16 UTC (rev 18748)
+++ coreplugins/trunk/ManualLayout/src/ManualLayout/common/GraphConverter2.java 
2009-12-11 23:13:22 UTC (rev 18749)
@@ -276,10 +276,10 @@
                                }
 
                                private void checkPosition(double xPos, double 
yPos) {
-                                       if ((xPos < 0.0d) || (xPos > 
getMaxWidth()))
+                                       if (Double.isNaN(xPos) || (xPos < 0.0d) 
|| (xPos > getMaxWidth()))
                                                throw new 
IllegalArgumentException("X position out of bounds");
 
-                                       if ((yPos < 0.0d) || (yPos > 
getMaxHeight()))
+                                       if (Double.isNaN(yPos) || (yPos < 0.0d) 
|| (yPos > getMaxHeight()))
                                                throw new 
IllegalArgumentException("Y position out of bounds");
                                }
 

--

You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.


Reply via email to