Merge pull request #66 from Irrational86/springyui-minEnergyThreshold
Enabled the ability to specify the parameter 'minEnergyThreshold' in springyui.js
This commit is contained in:
commit
c14da4feae
|
@ -32,6 +32,7 @@ jQuery.fn.springy = function(params) {
|
||||||
var stiffness = params.stiffness || 400.0;
|
var stiffness = params.stiffness || 400.0;
|
||||||
var repulsion = params.repulsion || 400.0;
|
var repulsion = params.repulsion || 400.0;
|
||||||
var damping = params.damping || 0.5;
|
var damping = params.damping || 0.5;
|
||||||
|
var minEnergyThreshold = params.minEnergyThreshold || 0.00001,
|
||||||
var nodeSelected = params.nodeSelected || null;
|
var nodeSelected = params.nodeSelected || null;
|
||||||
var nodeImages = {};
|
var nodeImages = {};
|
||||||
var edgeLabelsUpright = true;
|
var edgeLabelsUpright = true;
|
||||||
|
@ -39,7 +40,7 @@ jQuery.fn.springy = function(params) {
|
||||||
var canvas = this[0];
|
var canvas = this[0];
|
||||||
var ctx = canvas.getContext("2d");
|
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
|
// calculate bounding box of graph layout.. with ease-in
|
||||||
var currentBB = layout.getBoundingBox();
|
var currentBB = layout.getBoundingBox();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user