Author: pwang
Date: 2012-04-27 14:51:48 -0700 (Fri, 27 Apr 2012)
New Revision: 29033

Modified:
   
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DGraphView.java
Log:
Apply a factor 0.98 to zoom, so that it leaves a small border around the 
network and any annotations.

Modified: 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DGraphView.java
===================================================================
--- 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DGraphView.java
     2012-04-27 21:15:20 UTC (rev 29032)
+++ 
core3/impl/trunk/ding-impl/ding-presentation-impl/src/main/java/org/cytoscape/ding/impl/DGraphView.java
     2012-04-27 21:51:48 UTC (rev 29033)
@@ -1112,12 +1112,14 @@
 
                        m_networkCanvas.m_xCenter = (((double) 
m_extentsBuff[0]) + ((double) m_extentsBuff[2])) / 2.0d;
                        m_networkCanvas.m_yCenter = (((double) 
m_extentsBuff[1]) + ((double) m_extentsBuff[3])) / 2.0d;
+
+                       // Apply a factor 0.98 to zoom, so that it leaves a 
small border around the network and any annotations.
                        final double zoom = Math.min(((double) 
m_networkCanvas.getWidth()) / 
                                                     (((double) 
m_extentsBuff[2]) - 
                                                      ((double) 
m_extentsBuff[0])), 
                                                      ((double) 
m_networkCanvas.getHeight()) / 
                                                     (((double) 
m_extentsBuff[3]) - 
-                                                     ((double) 
m_extentsBuff[1])));
+                                                     ((double) 
m_extentsBuff[1]))) * 0.98;
                        m_networkCanvas.m_scaleFactor = 
checkZoom(zoom,m_networkCanvas.m_scaleFactor);
                        if (calledFromGetSnapshot) {
                                calledFromGetSnapshot = false;

-- 
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