Skip to content

Commit

Permalink
Oops, forgot to create local var
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Hotson committed Aug 15, 2011
1 parent 193e99a commit b468705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions springyui.js
Expand Up @@ -26,15 +26,15 @@ 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;
var damping = params.damping || 0.5;

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();
Expand Down

0 comments on commit b468705

Please sign in to comment.