Author: scooter
Date: 2010-09-01 11:37:04 -0700 (Wed, 01 Sep 2010)
New Revision: 21654

Modified:
   
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/ViewUtils.java
Log:
Sheesh -- talk about over-engineering!  Custom graphics are in node coordinates 
-- no need to worry about transformations.


Modified: 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/ViewUtils.java
===================================================================
--- 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/ViewUtils.java
        2010-09-01 15:37:18 UTC (rev 21653)
+++ 
csplugins/trunk/ucsf/scooter/nodeCharts/src/main/java/nodeCharts/view/ViewUtils.java
        2010-09-01 18:37:04 UTC (rev 21654)
@@ -63,16 +63,10 @@
                DNodeView nView = (DNodeView)view.getNodeView(node);
 
                // Get the affine transform 
-               double height = nView.getHeight();
-               double width = nView.getWidth();
-               double zoom = ((DGraphView)view).getZoom();
+               double height = (nView.getHeight()-nView.getBorderWidth())*0.90;
+               double width = (nView.getWidth()-nView.getBorderWidth())*0.90;
 
-               // Transform the hieght and width to the viewport coordinates
-               System.out.println("Node: "+node+" has size 
("+width+","+height+") and the zoom is "+zoom);
-               height = height*zoom*.8;
-               width = width*zoom*.8;
-
                // Create the bounding box.
-               return new Rectangle2D.Double(-width, -height, width*2, 
height*2);
+               return new Rectangle2D.Double(-width/2, -height/2, width, 
height);
        }
 }

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