Author: marekz
Date: 2011-08-14 18:59:42 -0700 (Sun, 14 Aug 2011)
New Revision: 26549
Modified:
cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/cytoscapeweb-svg.js
cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/main.html
Log:
Added fix for FDL init
Modified: cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/cytoscapeweb-svg.js
===================================================================
--- cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/cytoscapeweb-svg.js
2011-08-15 01:39:09 UTC (rev 26548)
+++ cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/cytoscapeweb-svg.js
2011-08-15 01:59:42 UTC (rev 26549)
@@ -157,6 +157,14 @@
this._particleSystem = null;
this._autoStoppedSimulating = false;
+ this._clearSimulation = function() {
+ this._simulating = false;
+ if (this._particleSystem) {
+ this._particleSystem.stop();
+ this._particleSystem = null;
+ }
+ };
+
this._startSimulating = function(repulsion, stiffness, friction) {
this._simulating = true;
if (!this._particleSystem) {
Modified: cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/main.html
===================================================================
--- cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/main.html 2011-08-15
01:39:09 UTC (rev 26548)
+++ cytoscapeweb/branches/gsoc2011/cytoscapeweb-svg/main.html 2011-08-15
01:59:42 UTC (rev 26549)
@@ -463,8 +463,9 @@
// Load a graph
var ps; // arbor.ParticleSystem
- var sr; // springyrenderer
+
function load(graph) {
+ vis._clearSimulation();
vis.loadGraph(graphs[graph]);
vis._startSimulating();
@@ -486,6 +487,7 @@
<p>By Marek Zaluski for GSoC 2011</p>
<button onclick="vis.changeZoom(10);">+</button><button
onclick="vis.changeZoom(-10)">-</button>
<div id="container-div"></div>
+
Load graph:
<select
onchange="load(this.options[selectedIndex].value)">
<option selected value="simpleGraph">Simple
graph</option>
@@ -493,6 +495,7 @@
<option value="ringGraph">Style demo</option>
<option value="pg">Large graph</option>
</select>
+
Load style:
<select
onchange="setstyle(this.options[selectedIndex].value)">
<option selected value="basicStyle">Basic
Style</option>
--
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.