Author: clopes
Date: 2011-10-20 14:43:34 -0700 (Thu, 20 Oct 2011)
New Revision: 27250
Modified:
cytoscapeweb/trunk/website/default.properties
cytoscapeweb/trunk/website/src/file/release_notes/release_notes_0.8.txt
cytoscapeweb/trunk/website/src/js/content/demo.js
cytoscapeweb/trunk/website/src/js/cytoscape_web/cytoscapeweb-styles-demo.js
Log:
Added CompoundSpringEmbedder layout options to showcase demo and ability to add
a node to another node (context menu).
Modified: cytoscapeweb/trunk/website/default.properties
===================================================================
--- cytoscapeweb/trunk/website/default.properties 2011-10-20 21:19:32 UTC
(rev 27249)
+++ cytoscapeweb/trunk/website/default.properties 2011-10-20 21:43:34 UTC
(rev 27250)
@@ -3,5 +3,5 @@
# The released Cytoscape Web version (downloadable zip & API doc)
cw.build.version=0.8
-CYTOSCAPEWEB_HOME=../../cytoscapeweb-compound
+CYTOSCAPEWEB_HOME=../cytoscapeweb
CW_FILE_HOME=../file
\ No newline at end of file
Modified:
cytoscapeweb/trunk/website/src/file/release_notes/release_notes_0.8.txt
===================================================================
--- cytoscapeweb/trunk/website/src/file/release_notes/release_notes_0.8.txt
2011-10-20 21:19:32 UTC (rev 27249)
+++ cytoscapeweb/trunk/website/src/file/release_notes/release_notes_0.8.txt
2011-10-20 21:43:34 UTC (rev 27250)
@@ -2,14 +2,14 @@
This release adds some great new features, such as:
</p>
<ul>
- <li>Compound nodes supports, thanks to the
+ <li>Compound nodes (i.e. nodes within nodes), thanks to the
<a href="http://www.cs.bilkent.edu.tr/~ivis" rel="external">i-Vis
Information Visualization Research Group</a>
of <a href="http://www.bilkent.edu.tr/index.html" rel="external">Bilkent
University</a>.</li>
<li>Set different width and height values to nodes (e.g. creating
ellipses, and not just circles).</li>
<li>Nodes can be totally transparent now but still display a background
image or the border.
You simply need to set <code>"transparent"</code> to the node
<code>color</code> visual property in a
<code>VisualStyle</code> or <code>VisualStyleBypass</code> object.</li>
- <li>The built-in pan-zoom control is also a bit more flexible now,
+ <li>The built-in pan-zoom control is also a bit more flexible,
as you can choose the position where it is placed when Cytoscape Web
starts.</li>
<li>The new addElements() function is much faster than using addNode() to
add many nodes.</li>
<li>And more! See the release notes for more details.</li>
@@ -23,8 +23,10 @@
<li><span class="bug_id">2481</span>: Add "nodeAttr" and
"interactionAttr" options to exportNetwork() function.</li>
<li><span class="bug_id">2487</span>: Add option for setting the
pan-zoom control position.</li>
<li><span class="bug_id">2566</span>: Node shape transparency with
background image.</li>
+ <li><span class="bug_id">2585</span>: dragstart & dragstop
events.</li>
<li><span class="bug_id">2591</span>: Autosize node according to
label.</li>
<li><span class="bug_id">2592</span>: Compound nodes.</li>
+ <li><span class="bug_id">2601</span>: Add zIndex to Node and Edge.</li>
</ul>
<ul class="bug_fixes">
<li><span class="bug_id">2480</span>: Handle List-type attributes when
exporting to GraphML.</li>
@@ -42,5 +44,6 @@
<li><span class="bug_id">2587</span>: Edge end does not intercept
ellipse node border when the edge is a loop.</li>
<li><span class="bug_id">2588</span>: Restore zoom from XGMML.</li>
<li><span class="bug_id">2590</span>: XGMML: Restore and save view
center correctly.</li>
+ <li><span class="bug_id">2602</span>: Added merged edge cannot be
selected.</li>
</ul>
</div>
\ No newline at end of file
Modified: cytoscapeweb/trunk/website/src/js/content/demo.js
===================================================================
--- cytoscapeweb/trunk/website/src/js/content/demo.js 2011-10-20 21:19:32 UTC
(rev 27249)
+++ cytoscapeweb/trunk/website/src/js/content/demo.js 2011-10-20 21:43:34 UTC
(rev 27250)
@@ -278,6 +278,7 @@
layout_names["Circle"] = "Circle";
layout_names["Radial"] = "Radial";
layout_names["Tree"] = "Tree";
+ layout_names["CompoundSpringEmbedder"] = "Compound";
// var edgeFieldsFn = function() {
// var edgeAttrList = [""];
@@ -321,6 +322,21 @@
{ id: "breadthSpace", label: "Breadth space", value: 30, tip: "The
space between siblings in the tree." },
{ id: "subtreeSpace", label: "Angle width", value: 5, tip: "The
space between different sub-trees." }
];
+ layout_options["CompoundSpringEmbedder"] = [
+ { id: "gravitation", label: "Gravitation",
value: -50, tip: "The gravitational constant. Negative
values produce a repulsive force." },
+ { id: "centralGravitation", label: "Central
gravitation", value: 50, tip: "All nodes are assumed to be
pulled slightly towards the center of the network by a central gravitational
force (gravitational constant) during layout." },
+ { id: "centralGravityDistance", label: "Central gravity
distance", value: 50, tip: "The radius of the region in the center
of the drawing, in which central gravitation is not exerted." },
+ { id: "compoundCentralGravitation", label: "Compound
central gravitation", value: 50, tip: " The central gravitational
constant for compound nodes." },
+ { id: "compoundCentralGravityDistance", label: "Compound
central gravity distance", value: 50, tip: " The central gravitational
constant for compound nodes. " },
+ { id: "tension", label: "Edge tension",
value: 50, tip: "The default spring tension for edges." },
+ { id: "restLength", label: "Edge rest length",
value: 50, tip: "The default spring rest length for edges." },
+ { id: "smartRestLength", label: "Smart rest length",
value: true, tip: "Whether or not smart calculation of ideal rest length
should be performed for inter-graph edges." },
+ { id: "layoutQuality", label: "Layout quality",
value: ["default","draft","proof"], tip: "A better quality layout requires more
iterations, taking longer." },
+ { id: "incremental", label: "Incremental",
value: false, tip: " If true, layout is applied incrementally by taking
current positions of nodes into account." },
+ { id: "uniformLeafNodeSizes", label: "Uniform leaf node sizes",
value: false, tip: " If true, leaf (non-compound or simple) node dimensions
are assumed to be uniform, resulting in faster layout." },
+ { id: "smartDistance", label: "Smart distance",
value: true, tip: "If true, gravitational repulsion forces are calculated only
when node pairs are in a certain range, resulting in faster layout at the
relatively minimal cost of layout quality." },
+ { id: "multiLevelScaling", label: "Multi level scaling",
value: false, tip: " If true, multi-level scaling algorithm is applied both to
better capture the overall structure of the network and to save time on large
networks." }
+ ];
// create tabs
$("#side").tabs({
@@ -1335,7 +1351,19 @@
update_with_loader();
})
.addContextMenuItem("Add new node", function(evt) {
- vis.addNode(evt.mouseX, evt.mouseY, { }, true);
+ var x = evt.mouseX;
+ var y = evt.mouseY;
+ var parentId;
+ if (evt.target != null && evt.target.group == "nodes") {
+ parentId = evt.target.data.id;
+ x = evt.target.x;
+ y = evt.target.y;
+ x += Math.random() * (evt.target.width/3) *
(Math.round(Math.random()*100)%2==0 ? 1 : -1);
+ y += Math.random() * (evt.target.height/3) *
(Math.round(Math.random()*100)%2==0 ? 1 : -1);
+ }
+ var n = vis.addNode(x, y, { parent: parentId }, true);
+ n.data.label = n.data.id;
+ vis.updateData([n]);
updateContextMenu();
dirty_graph_state();
})
Modified:
cytoscapeweb/trunk/website/src/js/cytoscape_web/cytoscapeweb-styles-demo.js
===================================================================
--- cytoscapeweb/trunk/website/src/js/cytoscape_web/cytoscapeweb-styles-demo.js
2011-10-20 21:19:32 UTC (rev 27249)
+++ cytoscapeweb/trunk/website/src/js/cytoscape_web/cytoscapeweb-styles-demo.js
2011-10-20 21:43:34 UTC (rev 27250)
@@ -98,6 +98,7 @@
},
nodes: {
shape: "ELLIPSE",
+ compoundShape: "ELLIPSE",
color: { defaultValue: "#fbfbfb",
discreteMapper: nodeColorMapper },
opacity: 1,
size: { defaultValue: 12, continuousMapper: {
attrName: "weight", minValue: 12, maxValue: 36 } },
@@ -149,6 +150,7 @@
},
nodes: {
shape: "RECTANGLE",
+ compoundShape: "RECTANGLE",
color: "#fefefe",
borderColor:"#374A70",
labelFontColor: "#374A70",
@@ -284,6 +286,7 @@
GRAPH_STYLES["Shapes"] = {
nodes: {
+ compoundShape: "ROUNDRECT",
size: 32,
selectionColor: "#aaaaff",
selectionOpacity: 1,
--
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.