Author: clopes
Date: 2010-07-16 20:55:22 -0700 (Fri, 16 Jul 2010)
New Revision: 20960

Modified:
   cytoscapeweb/branches/gsoc2010/gbeb/src/GBEBView.as
Log:
Fixed app initialization -  Operator runs again

Modified: cytoscapeweb/branches/gsoc2010/gbeb/src/GBEBView.as
===================================================================
--- cytoscapeweb/branches/gsoc2010/gbeb/src/GBEBView.as 2010-07-17 01:34:58 UTC 
(rev 20959)
+++ cytoscapeweb/branches/gsoc2010/gbeb/src/GBEBView.as 2010-07-17 03:55:22 UTC 
(rev 20960)
@@ -43,8 +43,8 @@
         private var _focus:NodeSprite;
         private var _appBounds:Rectangle;
                                
-                               //testing Variables
-                               private var addEventCounter:int = 0;
+               //testing Variables
+               private var addEventCounter:int = 0;
         
         
         public function GBEBView() {
@@ -88,11 +88,11 @@
             });
  
             _vis = new Visualization(data);
-            _vis.continuousUpdates = false;
-                                               
-                                               addChild(_vis);
+            //_vis.continuousUpdates = false;
+            addChild(_vis);
  
-            this.addEventListener(Event.ADDED, function(evt:Event):void {
+            if (_bounds) resize(_bounds);
+ 
                 // place around circle by tree structure, radius mapped to 
depth
                 _vis.operators.add(new CircleLayout("depth", null, false));
                 CircleLayout(_vis.operators.last).startRadiusFraction = 3/5;
@@ -103,10 +103,18 @@
                 // longer edge, lighter alpha: 1/(2*numCtrlPoints)
                 _vis.operators.add(new PropertyEncoder({ alpha: edgeAlpha }, 
Data.EDGES));
            
-                // update
-                _vis.update();
-                                                               
+                // TODO: replace by GBEB Router:
+                // 
##############################################################            
+                // bundle edges to route along the tree structure
+                //_vis.operators.add(new BundledEdgeRouter(0.95));
                 
+                //var bounds:Rectangle = new Rectangle(0, 0, width, height);
+                _vis.operators.add(new GBEBRouter(_bounds, 0.95));
+                trace("GBEBView: how many times is this called?" + 
addEventCounter++);
+                // 
############################################################## 
+                               
+                               _vis.update();
+                
                 // show all dependencies on single-click
                 var linkType:int = NodeSprite.OUT_LINKS;
                 _vis.controls.add(new ClickControl(NodeSprite, 1,
@@ -137,26 +145,6 @@
                 // add mouse-over highlight
                 var hov:HoverControl = new HoverControl(NodeSprite, 
HoverControl.DONT_MOVE, highlight, unhighlight);
                 _vis.controls.add(hov);
-                
-                // compute the layout          
-                if (_bounds) resize(_bounds);
-                                                               
-                                                               
-                                                               // TODO: 
replace by GBEB Router:
-                                                               // 
##############################################################            
-                                                               // bundle edges 
to route along the tree structure
-                                                               
//_vis.operators.add(new BundledEdgeRouter(0.95));
-                                                               
-                                                               //var 
bounds:Rectangle = new Rectangle(0, 0, width, height);
-                                                               
_vis.operators.add(new GBEBRouter(_bounds, 0.95));
-                                                               
trace("GBEBView: how many times is this called?" + addEventCounter++);
-                                                               _vis.update();
-                                                               // 
############################################################## 
-            });
-            
-           // define the visualization
-                                               
-                                               
         }
         
         /** Add highlight to a node and connected edges/nodes */

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