Removed animation interval parameter

This commit is contained in:
Dennis Hotson 2012-11-05 18:20:17 +11:00
parent b373d7ead6
commit ed57f50079
2 changed files with 4 additions and 5 deletions

View File

@ -411,7 +411,7 @@ Layout.requestAnimationFrame = __bind(window.requestAnimationFrame ||
// start simulation
Layout.ForceDirected.prototype.start = function(interval, render, done) {
Layout.ForceDirected.prototype.start = function(render, done) {
var t = this;
if (this._started) return;
@ -547,8 +547,7 @@ Layout.ForceDirected.Spring = function(point1, point2, length, k) {
// };
// Renderer handles the layout rendering loop
function Renderer(interval, layout, clear, drawEdge, drawNode) {
this.interval = interval;
function Renderer(layout, clear, drawEdge, drawNode) {
this.layout = layout;
this.clear = clear;
this.drawEdge = drawEdge;
@ -563,7 +562,7 @@ Renderer.prototype.graphChanged = function(e) {
Renderer.prototype.start = function() {
var t = this;
this.layout.start(50, function render() {
this.layout.start(function render() {
t.clear();
t.layout.eachEdge(function(edge, spring) {

View File

@ -131,7 +131,7 @@ jQuery.fn.springy = function(params) {
return 20;
};
var renderer = new Renderer(1, layout,
var renderer = new Renderer(layout,
function clear() {
ctx.clearRect(0,0,canvas.width,canvas.height);
},