Minor tidy ups

- whitespace fix
- added a few var's
This commit is contained in:
Dennis Hotson 2011-08-12 19:57:47 +10:00
parent 14aea1afe6
commit affbca426c
2 changed files with 10 additions and 10 deletions

View File

@ -35,13 +35,13 @@ var Graph = function()
this.eventListeners = [];
};
Node = function(id, data)
var Node = function(id, data)
{
this.id = id;
this.data = typeof(data) !== 'undefined' ? data : {};
};
Edge = function(id, source, target, data)
var Edge = function(id, source, target, data)
{
this.id = id;
this.source = source;

View File

@ -26,14 +26,14 @@ Copyright (c) 2010 Dennis Hotson
(function() {
jQuery.fn.springy = function(params) {
var graph = params.graph;
if(!graph){
return;
}
var stiffness = params.stiffness || 400.0;
var repulsion = params.repulsion || 400.0;
var damping = params.damping || 0.5;
var graph = params.graph;
if(!graph){
return;
}
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");