mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-30 10:04:42 +00:00
Remove onFpsUpdate as it's such a rarely used functionality (and could be accomplished on application level).
This commit is contained in:
parent
79f1b47063
commit
8494350baf
3 changed files with 1 additions and 45 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue