Author: onursumer
Date: 2011-08-05 05:12:27 -0700 (Fri, 05 Aug 2011)
New Revision: 26383

Added:
   cytoscapeweb/branches/compound/html-template/fixtures/test3.graphml
Modified:
   cytoscapeweb/branches/compound/html-template/js/compound.js
   cytoscapeweb/branches/compound/html-template/tests.html
Log:
A new compound graph (test3.graphml) is added under html-template/fixtures 
directory. Also html-template/tests.html is modified to enable testing of this 
graph. Currently, some of the tests fail for the compound graph. However, 
failures of the tests related to filtering and node removing seem to be 
expected results.

Added: cytoscapeweb/branches/compound/html-template/fixtures/test3.graphml
===================================================================
--- cytoscapeweb/branches/compound/html-template/fixtures/test3.graphml         
                (rev 0)
+++ cytoscapeweb/branches/compound/html-template/fixtures/test3.graphml 
2011-08-05 12:12:27 UTC (rev 26383)
@@ -0,0 +1,108 @@
+<graphml xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns 
http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"; 
xmlns="http://graphml.graphdrawing.org/xmlns"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+  <key id="weight" for="node" attr.name="weight" attr.type="double"/>
+  <key id="ranking" for="node" attr.name="ranking" attr.type="int"/>
+  <key id="type" for="node" attr.name="type" attr.type="string"/>
+  <key id="shape" for="node" attr.name="shape" attr.type="string"/>
+  <key id="label" for="node" attr.name="label" attr.type="string"/>
+  <key id="special" for="node" attr.name="special" attr.type="boolean"/>
+  <key id="type" for="edge" attr.name="type" attr.type="string"/>
+  <key id="interaction" for="edge" attr.name="interaction" attr.type="string">
+    <default>pp</default>
+  </key>
+  <key id="weight" for="edge" attr.name="weight" attr.type="double"/>
+  <key id="sourceArrowShape" for="edge" attr.name="sourceArrowShape" 
attr.type="string"/>
+  <key id="targetArrowShape" for="edge" attr.name="targetArrowShape" 
attr.type="string"/>
+  <graph edgedefault="undirected">
+    <node id="3">
+      <data key="special">true</data>
+      <data key="label">n3</data>
+      <data key="shape">OCTAGON</data>
+      <data key="weight">0.09</data>
+      <data key="ranking">3</data>
+      <data key="type">1</data>
+    </node>
+    <node id="1">
+      <data key="special">true</data>
+      <data key="label">n1</data>
+      <data key="shape">RECTANGLE</data>
+      <data key="weight">0.45</data>
+      <data key="ranking">1</data>
+      <data key="type">1</data>
+      <graph edgedefault="undirected">
+        <node id="4">
+          <data key="special">true</data>
+          <data key="label">n4</data>
+          <data key="shape">ELLIPSE</data>
+          <data key="weight">0.25</data>
+          <data key="ranking">4</data>
+          <data key="type">1</data>
+        </node>
+        <node id="2">
+          <data key="special">true</data>
+          <data key="label">n2</data>
+          <data key="shape">RECTANGLE</data>
+          <data key="weight">0.6</data>
+          <data key="ranking">2</data>
+          <data key="type">1</data>
+          <graph edgedefault="undirected">
+            <node id="5">
+              <data key="special">true</data>
+              <data key="label">n5</data>
+              <data key="shape">ELLIPSE</data>
+              <data key="weight">0.35</data>
+              <data key="ranking">5</data>
+              <data key="type">1</data>
+            </node>
+          </graph>
+        </node>
+        <edge directed="true" target="2" source="4">
+          <data key="interaction">pg</data>
+          <data key="type">1</data>
+          <data key="targetArrowShape">delta</data>
+          <data key="weight">0.1</data>
+          <data key="sourceArrowShape">T</data>
+        </edge>
+      </graph>
+    </node>
+    <edge directed="true" target="1" source="3">
+      <data key="interaction">pg</data>
+      <data key="type">1</data>
+      <data key="targetArrowShape">T</data>
+      <data key="weight">0.6</data>
+      <data key="sourceArrowShape">delta</data>
+    </edge>
+    <edge directed="true" target="1" source="3">
+      <data key="type">2</data>
+      <data key="targetArrowShape">T</data>
+      <data key="weight">0.6</data>
+      <data key="sourceArrowShape">delta</data>
+    </edge>
+    <edge directed="true" target="3" source="1">
+      <data key="interaction">gg</data>
+      <data key="type">3</data>
+      <data key="targetArrowShape">T</data>
+      <data key="weight">0.1</data>
+      <data key="sourceArrowShape">diamond</data>
+    </edge>
+    <edge target="3" source="5">
+      <data key="targetArrowShape">diamond</data>
+      <data key="weight">0.5</data>
+      <data key="type">1</data>
+      <data key="interaction">gg</data>
+      <data key="sourceArrowShape">circle</data>
+    </edge>
+    <edge target="4" source="5">
+      <data key="targetArrowShape">none</data>
+      <data key="weight">0.6</data>
+      <data key="type">1</data>
+      <data key="sourceArrowShape">none</data>
+    </edge>
+    <edge target="3" source="4">
+      <data key="targetArrowShape">circle</data>
+      <data key="weight">0.8</data>
+      <data key="type">2</data>
+      <data key="interaction">pg</data>
+      <data key="sourceArrowShape">diamond</data>
+    </edge>
+  </graph>
+</graphml>
\ No newline at end of file

Modified: cytoscapeweb/branches/compound/html-template/js/compound.js
===================================================================
--- cytoscapeweb/branches/compound/html-template/js/compound.js 2011-08-05 
02:02:26 UTC (rev 26382)
+++ cytoscapeweb/branches/compound/html-template/js/compound.js 2011-08-05 
12:12:27 UTC (rev 26383)
@@ -597,11 +597,11 @@
 
 function visibility(element)
 {
-       var selectedNodes = vis.selected();
+       var selectedElements = vis.selected();
        
-       for (var i=0; i < selectedNodes.length; i++)
+       for (var i=0; i < selectedElements.length; i++)
        {
-               if (element.data.id == selectedNodes[i].data.id)
+               if (element.data.id == selectedElements[i].data.id)
                {
                        return false;
                }

Modified: cytoscapeweb/branches/compound/html-template/tests.html
===================================================================
--- cytoscapeweb/branches/compound/html-template/tests.html     2011-08-05 
02:02:26 UTC (rev 26382)
+++ cytoscapeweb/branches/compound/html-template/tests.html     2011-08-05 
12:12:27 UTC (rev 26383)
@@ -81,6 +81,21 @@
             options2.network = xml;
             vis2.draw(options2);
         });
+
+        var options3 = {
+                panZoomControlVisible: true,
+                edgesMerged: false,
+                nodeLabelsVisible: true,
+                nodeTooltipsEnabled: false,
+                edgeTooltipsEnabled: true
+            };
+        var vis3 = new org.cytoscapeweb.Visualization("cytoweb3");
+        vis3.ready(function() { runGraphTests("Vis-3", vis3, options3); });
+
+        $.get("fixtures/test3.graphml", function(xml){
+            options3.network = xml;
+            vis3.draw(options3);
+        });
     });
 </script>
 </head>
@@ -94,6 +109,8 @@
         <div id="image_cytoweb1">PNG Image</div>
         <div id="cytoweb2"></div>
         <div id="image_cytoweb2">PNG Image</div>
+        <div id="cytoweb3"></div>
+        <div id="image_cytoweb3">PNG Image</div>
     </div>
 
     <ol id="qunit-tests"></ol>

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