Oops, forgot to create local var
This commit is contained in:
parent
193e99a619
commit
b4687059d2
|
@ -26,7 +26,7 @@ Copyright (c) 2010 Dennis Hotson
|
|||
(function() {
|
||||
|
||||
jQuery.fn.springy = function(params) {
|
||||
this.graph = params.graph || new Graph();
|
||||
var graph = this.graph = params.graph || new Graph();
|
||||
|
||||
var stiffness = params.stiffness || 400.0;
|
||||
var repulsion = params.repulsion || 400.0;
|
||||
|
@ -34,7 +34,7 @@ jQuery.fn.springy = function(params) {
|
|||
|
||||
var canvas = this[0];
|
||||
var ctx = canvas.getContext("2d");
|
||||
this.layout = new Layout.ForceDirected(graph, stiffness, repulsion, damping);
|
||||
var layout = this.layout = new Layout.ForceDirected(graph, stiffness, repulsion, damping);
|
||||
|
||||
// calculate bounding box of graph layout.. with ease-in
|
||||
var currentBB = layout.getBoundingBox();
|
||||
|
|
Loading…
Reference in New Issue
Block a user