From 3f6af5f8969b7647fc9b541523aef19b367d226e Mon Sep 17 00:00:00 2001 From: Alex de Mulder Date: Tue, 13 May 2014 16:42:59 +0200 Subject: [PATCH] fixed stabilized event #131 --- src/graph/Graph.js | 7 +++++-- src/graph/graphMixins/physics/PhysicsMixin.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/graph/Graph.js b/src/graph/Graph.js index 6c348bfb..d95cbe0f 100644 --- a/src/graph/Graph.js +++ b/src/graph/Graph.js @@ -490,9 +490,12 @@ Graph.prototype.setData = function(data, disableStart) { if (!disableStart) { // find a stable position or start animating to a stable position if (this.stabilize) { - this._stabilize(); + var me = this; + setTimeout(function() {me._stabilize(); me.start();},0) + } + else { + this.start(); } - this.start(); } }; diff --git a/src/graph/graphMixins/physics/PhysicsMixin.js b/src/graph/graphMixins/physics/PhysicsMixin.js index 970c6cc0..bb6b7106 100644 --- a/src/graph/graphMixins/physics/PhysicsMixin.js +++ b/src/graph/graphMixins/physics/PhysicsMixin.js @@ -317,7 +317,7 @@ var physicsMixin = { '' + '' + '' + - '' + + '' + '' + '' + '' +