Author: clopes
Date: 2011-07-18 13:27:48 -0700 (Mon, 18 Jul 2011)
New Revision: 26201

Modified:
   
cytoscapeweb/branches/compound/src/org/cytoscapeweb/view/layout/ForceDirectedLayout.as
Log:
Fixes #2563: Weighted FDL does not work if the edge attribute is NOT called 
'weight'

Modified: 
cytoscapeweb/branches/compound/src/org/cytoscapeweb/view/layout/ForceDirectedLayout.as
===================================================================
--- 
cytoscapeweb/branches/compound/src/org/cytoscapeweb/view/layout/ForceDirectedLayout.as
      2011-07-18 20:25:51 UTC (rev 26200)
+++ 
cytoscapeweb/branches/compound/src/org/cytoscapeweb/view/layout/ForceDirectedLayout.as
      2011-07-18 20:27:48 UTC (rev 26201)
@@ -99,7 +99,13 @@
         public function get maxWeight():Number { return _maxWeight; }
         public function set maxWeight(max:Number):void { _maxWeight = max; }
         
-        public function get edges():DataList { return 
visualization.data.group(Groups.MERGED_EDGES); }
+        public function get edges():DataList {
+            // The layout is optimized for merged edges only if it is not 
weighted,
+            // because it needs to get the weight attribute from regular edges!
+            var gr:String = weighted ? Groups.REGULAR_EDGES : 
Groups.MERGED_EDGES;
+            
+            return visualization.data.group(gr);
+        }
 
         // ========[ CONSTRUCTOR 
]==================================================================
 

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