From 631212c074f5424214c88f959e667d3fc077f046 Mon Sep 17 00:00:00 2001 From: Dennis Hotson Date: Wed, 23 Jul 2014 21:40:29 +1000 Subject: [PATCH] Updated to 2.6.0 --- springy.js | 4 ++-- springyui.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/springy.js b/springy.js index 0e785e9..fb90e3f 100644 --- a/springy.js +++ b/springy.js @@ -1,5 +1,5 @@ /** - * Springy v2.5.0 + * Springy v2.6.0 * * Copyright (c) 2010-2013 Dennis Hotson * @@ -677,7 +677,7 @@ t.layout.eachNode(function(node, point) { t.drawNode(node, point.p); }); - }, this.onRenderStart, this.onRenderStop); + }, this.onRenderStop, this.onRenderStart); }; Renderer.prototype.stop = function() { diff --git a/springyui.js b/springyui.js index e339526..fb8b896 100755 --- a/springyui.js +++ b/springyui.js @@ -32,6 +32,7 @@ jQuery.fn.springy = function(params) { var stiffness = params.stiffness || 400.0; var repulsion = params.repulsion || 400.0; var damping = params.damping || 0.5; + var minEnergyThreshold = params.minEnergyThreshold || 0.00001, var nodeSelected = params.nodeSelected || null; var nodeImages = {}; var edgeLabelsUpright = true; @@ -39,7 +40,7 @@ jQuery.fn.springy = function(params) { var canvas = this[0]; var ctx = canvas.getContext("2d"); - var layout = this.layout = new Springy.Layout.ForceDirected(graph, stiffness, repulsion, damping); + var layout = this.layout = new Springy.Layout.ForceDirected(graph, stiffness, repulsion, damping, minEnergyThreshold); // calculate bounding box of graph layout.. with ease-in var currentBB = layout.getBoundingBox();