Author: Christian Lopes
Date: 2010-07-22 13:32:10 -0700 (Thu, 22 Jul 2010)
New Revision: 20992

Modified:
   
cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/GBEBRouter.as
   cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/Shape.as
Log:
Removed unnecessary extra iteration over edges to add empty control points 
array.
Trying BSPLINE instead of BEZIER.

Modified: 
cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/GBEBRouter.as
===================================================================
--- 
cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/GBEBRouter.as 
    2010-07-22 13:59:50 UTC (rev 20991)
+++ 
cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/GBEBRouter.as 
    2010-07-22 20:32:10 UTC (rev 20992)
@@ -129,13 +129,6 @@
                 
                 var data:Data = visualization.data;
                 
-                // Step 0: Assign GBEB control points to each mesh Edge that 
is used for controling them
-                // TODO: remove this extra iteration and create ctrl points 
array on demand:
-                data.edges.visit(function (e:EdgeSprite):void {
-                    e.props.$controlPointsArray = [];
-                    e.shape = Shapes.BEZIER;
-                });
-                
                 mergeShapeUsingPrimaryDirections();
                 generateMeshEdges();
                 

Modified: 
cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/Shape.as
===================================================================
--- cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/Shape.as  
2010-07-22 13:59:50 UTC (rev 20991)
+++ cytoscapeweb/branches/gsoc2010/gbeb/src/gbeb/view/operator/router/Shape.as  
2010-07-22 20:32:10 UTC (rev 20992)
@@ -1,5 +1,6 @@
 package gbeb.view.operator.router
 {
+       import flare.util.Shapes;
        import flare.vis.data.EdgeSprite;
        
        import flash.geom.Point;
@@ -139,11 +140,11 @@
                        a = new Point(meshEdge.x1, meshEdge.y1);
                        b = new Point(meshEdge.x2, meshEdge.y2);
                        
-                       var dataEdge:EdgeSprite;
+                       var edge:EdgeSprite;
                        
-                       for each (dataEdge in storedDataEdges) {
-                               e = new Point(dataEdge.source.x, 
dataEdge.source.y);
-                               f = new Point(dataEdge.target.x, 
dataEdge.target.y);
+                       for each (edge in storedDataEdges) {
+                               e = new Point(edge.source.x, edge.source.y);
+                               f = new Point(edge.target.x, edge.target.y);
                                
                                intersectionPoint = 
GeometryUtil.lineIntersectLine(a, b, e, f);
                                
@@ -158,9 +159,12 @@
                                trace("Shape: addControlPoints: " + 
(gridIndex[0] as Point).toString() + " has no controlPoint");
                        }
                        
-                       for each (dataEdge in storedDataEdges) {
-                               var ctrl:Array = 
dataEdge.props.$controlPointsArray;
-                               if (ctrl == null) ctrl = [];
+                       for each (edge in storedDataEdges) {
+                           edge.shape = Shapes.BSPLINE;
+                               var ctrl:Array = edge.props.$controlPointsArray;
+                               if (ctrl == null) {
+                                   edge.props.$controlPointsArray = ctrl = [];
+                               }
                                ctrl.push(controlPoint);
                        }
 

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