Switch order of onRenderStop and onRenderStart to preserve backwards compat

This commit is contained in:
Dennis Hotson 2014-01-11 03:59:41 +11:00
parent ac17d28337
commit cec178680f

View File

@ -487,7 +487,7 @@
* Start simulation if it's not running already.
* In case it's running then the call is ignored, and none of the callbacks passed is ever executed.
*/
Layout.ForceDirected.prototype.start = function(render, onRenderStart, onRenderStop) {
Layout.ForceDirected.prototype.start = function(render, onRenderStop, onRenderStart) {
var t = this;
if (this._started) return;
@ -632,16 +632,16 @@
/**
* Renderer handles the layout rendering loop
* @param onRenderStart optional callback function that gets executed whenever rendering starts.
* @param onRenderStop optional callback function that gets executed whenever rendering stops.
* @param onRenderStart optional callback function that gets executed whenever rendering starts.
*/
var Renderer = Springy.Renderer = function(layout, clear, drawEdge, drawNode, onRenderStart, onRenderStop) {
var Renderer = Springy.Renderer = function(layout, clear, drawEdge, drawNode, onRenderStop, onRenderStart) {
this.layout = layout;
this.clear = clear;
this.drawEdge = drawEdge;
this.drawNode = drawNode;
this.onRenderStart = onRenderStart;
this.onRenderStop = onRenderStop;
this.onRenderStart = onRenderStart;
this.layout.graph.addGraphListener(this);
}