Remove onFpsUpdate as it's such a rarely used functionality (and could be accomplished on application level).

This commit is contained in:
kangax 2012-10-20 20:10:32 +02:00
parent 79f1b47063
commit 8494350baf
3 changed files with 1 additions and 45 deletions

View file

@ -107,13 +107,6 @@
/* NOOP */
},
/**
* Callback; invoked on every redraw of canvas and is being passed a number indicating current fps
* @method onFpsUpdate
* @param {Number} fps
*/
onFpsUpdate: null,
_initStatic: function(el, options) {
this._objects = [];
@ -481,8 +474,7 @@
this.clearContext(canvasToDrawOn);
}
var activeGroup = this.getActiveGroup(),
startTime = new Date();
var activeGroup = this.getActiveGroup();
if (this.clipTo) {
this._clipCanvas(canvasToDrawOn);

View file

@ -785,24 +785,6 @@
}, 1000);
});
test('onFpsUpdate', function() {
ok(typeof canvas.onFpsUpdate != 'undefined');
var invoked = false, fps;
canvas.onFpsUpdate = function(value) {
invoked = true;
fps = value;
};
canvas.renderAll();
ok(invoked, 'onFpsUpdate should be invoked');
ok(typeof fps == 'number', 'onFpsUpdate must receive numeric value');
});
// asyncTest('backgroundImage', function() {
// deepEqual('', canvas.backgroundImage);
// canvas.setBackgroundImage('../../assets/pug.jpg');

View file

@ -536,24 +536,6 @@
}, 1000);
});
test('onFpsUpdate', function() {
ok(typeof canvas.onFpsUpdate != 'undefined');
var invoked = false, fps;
canvas.onFpsUpdate = function(value) {
invoked = true;
fps = value;
};
canvas.renderAll();
ok(invoked, 'onFpsUpdate should be invoked');
ok(typeof fps == 'number', 'onFpsUpdate must receive numeric value');
});
// asyncTest('backgroundImage', function() {
// deepEqual('', canvas.backgroundImage);
// canvas.setBackgroundImage('../../assets/pug.jpg');